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 The WordPress Sidebar MenuIn Part One of this tutorial, we explained the basics of using widgets in WordPress.

In this section you are going to learn how to configure a number of commonly-used sidebar widgets in WordPress.

Widget Configuration

By default, your site comes with several built-in active widgets, such as widgets that let you display links to your site’s pages, recent posts, news items, add tag clouds, etc.

In a default WordPress installation, your site comes with a number of pre-installed widgets

(By default, your site comes with a number of pre-installed widgets)

Adding Commonly-Used WordPress Sidebar Widgets To WordPress: Step-By-Step Tutorial

In this tutorial, you are going to add, configure and reorder various WordPress widgets to display in your site’s sidebar section, including:

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

The Widgets screen is located inside your WP administration area and can be accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets section in your browser …

Widgets Screen

(Widgets Section)

Let’s start to configure some sidebar menu widgets …

Text Widgets

Text widgets are quite useful …

Text widget

(WordPress Text widget)

Info

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)

Text widgets can be used to add comments, maps and directions, scripts and more to your site … simply type in text or paste HTML into the widget content area. You can also add an optional title in the Title field. Remember to save your settings when done …

Text widgets are very useful

(A text widget is very useful!)

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

For this example, let’s set up a support button on your sidebar navigation area 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, create or source a “help button” graphic image that visitors can click on …

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

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

Add A Contact Button To Your Sidebar Area Using A Text Widget

Step 1 – Upload your image.

To display the clickable image on your site, the graphic image must be uploaded to your server. Upload your button graphic to a folder on your server and write down the address of your image location.

E.g. …

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

This information will be required in Step 3.

In order for visitors to go to the contact page when they click on the support button, either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will then link your button image to this URL in Step 3

Step 2 – Add the support page.

Create a contact page and note down its URL …

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

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

Don’t worry … this sounds a lot more technical than it is. In simple terms, we just need to create the instructions for your clickable image.

Your code can be written a plain text editor and should look something like this …

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

  • 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 with the URL of your image location.

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

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

Replace the above URLs and then copy the above code to your clipboard when finished.

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

Now, go back into your Widgets panel …

Activate or deactivate widgets using drag-and-drop

(Widgets Area)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar in the location where your button should display.

In the Available Widgets area, find the Text widget …

WordPress text widget

(Text widget)

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

Drag and drop your WordPress text widget

(Drag-and-drop your WordPress text widget)

Step 5 – Configure your text widget.

Click on the Text widget title bar to configure the widget 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 to the widget if you want (e.g. “Need Help?”, “Support”, etc.) and paste the code with the correct destination URLs into the Content area, then click Save when done …

WordPress text widget

Info

Note: Make sure to check all links before pasting scripts into the Text Widget, or the clickable button will not work.

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

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

Here is some text with Automatically add paragraphs box unchecked …

Automatically add paragraphs box not selected

(Automatically add paragraphs box unchecked)

Here is some text with Automatically add paragraphs box selected …

Automatically add paragraphs box ticked

(Automatically add paragraphs box checked)

***

Step 6 – Refresh your browser.

Once you have added the widget and HTML code, go to the front-end of your site and refresh your browser. If you have entered all of the links correctly, then the clickable support button should display at the top of the sidebar menu …

Add A Support Button To Your Sidebar Area Using A Text Widget

(Clickable button widget on blog sidebar)

The above screenshot shows ’click for help’ button added to a newly-installed WordPress site.

Step 7 – Test your widget.

The last step is to ensure that the clickable button works. Test this by clicking the support button. If you are taken directly to your support page, then everything has been set up correctly …

Test your clickable button to ensure you've set everything up correctly

(Test the clickable button to make sure you’ve set everything up correctly)

Practical Tip

Useful Tips:

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

Add A Support Button To The Sidebar Section Using A Text Widget

To this (i.e. include the section containing target=”_blank” in the html code):

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

When choosing images for your sidebar navigation area, make sure that the width of your image doesn’t exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. As mentioned earlier, some themes may display different column widths depending on their templates and layout. Some sidebars are wide and some are narrow. If your theme’s sidebar is narrower than the width of the graphic images, then you may need to either adjust the graphic size, or the width of your sidebar column to make elements display correctly on your sidebar section.

Adjust column width or reduce image size

(Make sure that the width of the image does not exceed the width of the sidebar column)

Extra Tips:

  • If you don’t want to center the button image inside the sidebar, delete the <center> and </center> tags from the beginning and end of the code. The image will then be left-aligned.
  • You can link your help button to any destination you like (e.g. to an external link, contact form, FAQ page, etc.) and change this anytime by replacing the code in your widget.

How To Use WordPress Widgets

***

This is the end of part two of this series of tutorials on how to use Widgets.

To view Part 3, click here:

***

"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group