How To Use And Configure WordPress Widgets – Part 2

Learn how to add, configure, and use text widgets on your WordPress sidebar …

How To Add Widgets To WordPressIn Part One of this step-by-step tutorial series, we cover the basics of using widgets in WordPress.

In this tutorial you will begin configuring a number of commonly-used sidebar widgets in WordPress.

Widget Configuration

By default, your site comes with several preinstalled widgets, such as widgets for displaying links to your site’s pages, recent posts, news items, filter content by publish dates, etc.

By default, your site comes with several preinstalled widgets

(In a default WordPress installation, your site comes with a number of built-in widgets)

How To Configure Frequently-Used Widgets On Your Sidebar: Tutorial

In this tutorial, we will add, configure and reorder a number of commonly-used widgets, including:

  • Add a Contact Us graphic linking to the contact details page.
  • Add a Categories section.
  • Adding a Recent Posts section.
  • Add a list of your site’s main Pages.
  • Display a list of useful Links on your sidebar area.
  • Add an RSS Feed section.
  • Add a list of clickable tags with a Tag Cloud section.
  • Configure how Archived Posts display on your sidebar.

The Widgets panel is located inside your dashboard area by going to Appearance > Widgets …

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets area in your browser window …

Widgets Screen

(Widgets Panel)

Let’s configure WordPress text widgets …

Adding Text Widgets To Your Blog Sidebar

Text widgets are incredibly useful …

WordPress Text widget

(Text widget)

Useful Information

Rich Text Widget

From version 4.8 onward, WordPress has added native rich-text editing capabilities to text widgets …

Rich Text Widget

(Rich Text Widget)

This lets you quickly and easily format text, create lists, add emphasis, and insert links into your sidebar text …

(Format text easily with the new text widget)

A text widget lets you insert just about anything you want into your sidebar or other widget sections, such as email and contact information, social media buttons, reviews and more to your site … simply by typing in text or inserting HTML into the content area. You can also give the widget a title. Remember to save your settings …

Text widgets are extremely versatile

(A text widget is very useful!)

Example: Add A Clickable Support Button To The Sidebar Navigation Area Using A Text Widget

For this example, we’ll set up a clickable help button on the sidebar that takes visitors to a page on your site (or an external site, e.g. a helpdesk) where they can contact you for help and support.

First, you will need to create or source a graphic image that you can use on your own site …

Using A Text Widget To Add A Clickable Support Button To Your Sidebar Menu

We’ll set up the clickable button to display at the top of the sidebar like in the example shown below …

Using A Text Widget To Add A Contact Button To The Sidebar Navigation Section

Step 1 – Upload your image.

To display the clickable button image on your site, first you must upload the button image to the images folder in your server and note the path to your image location.

For example …

http://www.yourdomain.com/images/supportbutton.jpg

You will use this information in Step 3.

In order for someone to go to the contact page when the help button gets clicked, either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link the button image to this URL in Step 3 …

Step 2 – Create a destination page.

Create a contact page on your site and note down its URL …

Use A Text Widget To Add A Clickable Contact Button To The Sidebar Navigation Area

Step 3 – Create the HTML code for your text widget.

If you’re not a technical-minded person, don’t worry … this sounds a lot more technical than it is. Basically, you just need to create the instructions for your clickable button.

Your code can be typed in a simple text file and should look something like this …

Use A Text Widget To Add A Help Button To Your Sidebar Navigation Area

  • Replace “http://www.yourdomain.com/contact-us” in the code above with the URL of your contact page location.
  • Replace “http://yourimagelocation.com/img/supportbutton.jpg” in the code above with the URL of your image location.

The image below shows the sections of the above code that you will need to replace with the actual contact page and image URLs …

Add A Clickable Contact Button To Your Sidebar Section Using A Text Widget

Replace the above URLs and then copy all of your text file content to your clipboard when finished.

If you need help understanding basic HTML code, refer to this tutorial:

Now, go back to your Widgets screen …

Activate or deactivate widgets using drag-and-drop

(Widgets Panel)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar where you would like your clickable button to display.

In the Available Widgets area, select a Text widget …

WordPress text widget

(Text widget)

Drag the Text widget to the Active Widgets section and release the widget at the very top of the Widget Area …

Drag-and-drop your Text widget

(Drag-and-drop your WordPress text widget)

Step 5 – Configure the text widget settings.

Click on the widget title bar to configure its settings. Paste the code with the links to your contact page and graphic button into the text widget content area and click the save button …

WordPress text widget

Add a title section to the widget if you want (e.g. “Need Help?”, “Support”, etc.) and paste the code with the correct URLs into the large text box, then click Save when done …

Text widget

Important

Note: Remember to test your contact page and button image links before pasting scripts into the Text Widget, or your button won’t work.

*** If using WordPress version pre-4.8 ***

If you’re adding text with no formatting tags like paragraph breaks, you may want to tick the Automatically add paragraphs box to wrap each block of text in paragraphs (note: this is not necessary if you type in formatted HTML content like we’re using in the example for this tutorial).

Here is some text with Automatically add paragraphs box not ticked …

Automatically add paragraphs box unchecked

(Automatically add paragraphs option unchecked)

Here is some text with Automatically add paragraphs option ticked …

Automatically add paragraphs option checked

(Automatically add paragraphs option checked)

***

Step 6 – Refresh the browser.

After adding your widget and HTML code, visit your site and refresh the browser. If you have entered all of the links correctly, then your clickable support button will display in the site’s sidebar menu …

Add A Clickable Help Button To Your Sidebar Menu Using A Text Widget

(Clickable button widget on sidebar)

The screenshot above shows the contact button in the sidebar of a newly-installed WordPress site.

Step 7 – Test your button.

The last step is to make sure that your links work. Test the button to make sure that your visitors will go to the help page when clicking the button. You should be taken directly to the support page …

Test the clickable button

(Test the text widget to make sure it works)

Practical Tip

Useful Tips:

If you want the contact page to open inside a new browser window when visitors click on the help (so they don’t leave the page they’re on), then change the code from this:

Using A Text Widget To Add A Clickable Support Button To The Sidebar Navigation Area

To this (i.e. include the part that says: target=”_blank” in the code):

Use A Text Widget To Add A Support Button To Your Sidebar Navigation Area - open in new window

When choosing images to add to your sidebar navigation area, make sure that the width of your image does not exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. As we’ve previously explained, some themes can display elements differently depending on their templates and layout. Some sidebars may be wider or narrower. If your theme’s sidebar width is narrower than the width of the graphic image, then you may have to either adjust the size of your images, or the width of your sidebar column to make graphics display correctly on your theme.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

Additional Tips:

  • If you don’t want to center your button inside the sidebar, delete the <center> and </center> tags from the beginning and end of the code. The image will then be aligned to its default settings (normally left-aligned).
  • Link your help button to any URL you like (e.g. to an external site, helpdesk, support forum, etc.) and change this anytime by editing the content in your widget.

How To Add And Configure Widgets In The WordPress Sidebar

***

This is the end of part two of this tutorial about using WordPress widgets.

To continue, click this link:

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org