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 And Configure WordPress Widgets In The BlogIn Part One of this step-by-step tutorial, we cover the basics of how to use WordPress widgets.

In this tutorial you will learn how to configure a number of WordPress sidebar widgets.

Configuring Sidebar Widgets

In a default WordPress installation, your site comes with a number of preinstalled widgets, such as widgets for displaying links to your site’s pages, filter posts by categories, RSS feed content, filter content by tags, etc.

In a default WordPress installation, your site comes with a number of preinstalled widgets

(By default, your site comes with several built-in widgets)

How To Add Sidebar Widgets In WordPress: Step-By-Step Tutorial

In this step-by-step tutorial series, you will add, configure and reorder various WordPress widgets, including:

  • Add a Help image linking to the contact page.
  • Adding a Categories section with a drop down menu.
  • Add a Recent Posts section to display your latest posts.
  • Adding a list of your site’s main Pages.
  • Display important Links on your sidebar navigation menu.
  • Add an RSS Feed section.
  • Add a Tag Cloud section.
  • Add and configure an Archives section to your sidebar section.

To access the Widgets panel go to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets section in your web browser …

Widgets Panel

(Widgets Area)

Let’s get started …

Text Widgets

Text widgets are incredibly useful …

WordPress Text widget

(Text widget)

Important 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)

A text widget can be used to add lists, image links, messages and more to your site … simply by typing in text or pasting HTML into the widget content area. You can also add an optional title in the Title field. Remember to save your settings …

A text widget is extremely versatile

(A text widget is really versatile!)

Example: Add A Clickable Contact Button To The Sidebar Section Using A Text Widget

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

Using A Text Widget To Add A Contact 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 …

Use A Text Widget To Add A Support Button To Your Sidebar Navigation Menu

Step 1 – Upload your image.

To display the image on your site, you must first upload the image to the images folder in your server and note the address of your server’s 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 your contact page when they click on the help 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 a contact page.

Create a contact page and note its URL …

Add A Clickable Help Button To The Sidebar Area Using A Text Widget

Step 3 – Compose your text widget code.

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 instructions can be typed in a simple text editor and should look something like this …

Using A Text Widget To Add A Support Button To Your Sidebar Navigation Section

  • Replace “http://www.yourdomain.com/contact-us” in the code 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 which sections of the above sample code you will need to replace with the actual contact details …

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

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

If you need help figuring out basic HTML code, see this tutorial:

Go back to your Widgets panel …

Activate or deactivate widgets using drag & drop

(Widgets Area)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar where you want the support button to display.

In the Available Widgets area, select the Text widget …

WordPress text widget

(WordPress text widget)

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

Dragging and dropping your WordPress text widget

(Drag-and-drop your WordPress text widget)

Step 5 – Configure the text widget settings.

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

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 destination URLs into the text area, then click the save button …

Text widget

Useful Information

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

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

If you’re 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: not required if you type in formatted HTML code like we’re doing in this tutorial).

Here is some text with Automatically add paragraphs option unchecked …

Automatically add paragraphs option unchecked

(Automatically add paragraphs option not selected)

Here is some text added to a Text widget with Automatically add paragraphs box checked …

Automatically add paragraphs box ticked

(Automatically add paragraphs option ticked)

***

Step 6 – Refresh the web browser.

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

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

(Clickable button widget on blog sidebar)

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

Step 7 – Test the button.

The last step is to ensure that the destination URL works. Test the button to make sure that visitors will go to your help page when they click on the button. If you are taken directly to the contact page, then everything has been set up correctly …

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

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

Useful Tip

Useful Tips:

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

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

To this (i.e. add the section that says: target=”_blank” in the html code):

Using A Text Widget To Add A Clickable Support Button To The Sidebar Navigation Section - open in new window

When adding images to your sidebar area, make sure that the width of the image doesn’t exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. Note that some themes can display different column widths 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 images, then you may have to either adjust the size of your images, or the width of your sidebar column to make images 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)

Additional Tips:

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

How To Add Widgets To WordPress

***

This is the end of part 2 of this tutorial series on how to use WordPress widgets.

Click here to read Part Three:

***

"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya