How To Use And Configure WordPress Widgets – Part 2

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

Adding Widgets To The SidebarIn Part One of this step-by-step tutorial series, we explained the basics of how to use WordPress widgets.

In this tutorial you are going to learn how to configure various commonly-used WordPress sidebar widgets.

How To Configure Commonly-Used WordPress Sidebar Widgets

In a default WordPress installation, your site comes with a number of built-in widgets, such as widgets that let you display links to your pages, filter posts by categories, text or HTML banners, adding tag clouds, etc.

By default, your site comes with a number of preinstalled widgets

(In a default WordPress installation, your site comes with a number of active widgets)

How To Add Widgets To The Sidebar Section: Step-By-Step Tutorial

In this step-by-step tutorial, we are going to add, configure and reorder various frequently-used widgets, including:

  • Add a clickable Support image linking visitors to the contact page.
  • Add a Categories section.
  • Adding a Recent Posts section to display your latest posts.
  • Add a list of Pages.
  • Display important Links on your sidebar.
  • Display news items using an RSS Feed section.
  • Adding a Tag Cloud.
  • Add and configure an Archives section to the sidebar.

To access the Widgets area log into the WordPress dashboard and go to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings you to the Widgets screen into your browser window …

Widgets Area

(Widgets Screen)

Let’s get started …

Add A Text Widget To The Sidebar Navigation Area

Text widgets are incredibly useful …

WordPress Text widget

(Text widget)

Important

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 of favorite items, videos, reviews and more to your site … simply by typing in text or adding HTML into the widget content area. You can also give the widget a title. Remember to save your settings …

A text widget is really useful

(A text widget is really useful!)

Example: Add A Help Button To The Sidebar Area Using A Text Widget

For this example, let’s set up a contact button on the sidebar that takes 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 you will want your visitors to click on …

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

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

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

Step 1 – Upload your image.

Upload the graphic image to your server and note the address of your image location.

For example …

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

This information will be used in Step 3.

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

Step 2 – Add a contact page.

Create a contact page and note its URL …

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

Step 3 – Create the 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, we just need to create the instructions linking your graphic image to your contact page/helpdesk.

Your instructions can be typed in a simple text file and will look something like this …

Add A Help Button To The 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 above with the URL of your image location.

The image below shows the sections of the above sample code that you will need to replace with the actual web addresses …

Add A Clickable Contact Button To The Sidebar Area 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 section …

Activate or deactivate widgets using drag & drop

(Widgets Screen)

Step 4 – Add a Text widget.

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

In the Available Widgets area, select the Text widget …

WordPress text widget

(Text widget)

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

Drag and drop your WordPress text widget

(Drag and drop your Text widget)

Step 5 – Configure the widget.

Click on the 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 save …

WordPress text widget

Add a heading to your widget if you want (e.g. “Need Help?”, “Get Support”, etc.) and paste the code with the correct destination links into the Content area, then click the save button …

Text widget

Info

Note: Make sure to test all URLs 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, 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’re typing in HTML content like we’re using in the example for this tutorial).

Here is some text added to a Text widget with Automatically add paragraphs option unchecked …

Automatically add paragraphs box 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 checked

(Automatically add paragraphs option checked)

***

Step 6 – Refresh the browser.

After adding the widget and code, visit the front end of your site and refresh the web browser. If all links have been entered correctly, then your clickable support button should display in the site’s sidebar menu …

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

(Clickable button widget on blog sidebar)

The above screenshot shows the contact button added to a brand new WordPress site.

Step 7 – Test your button.

The last step is to ensure that the destination URL works. Test this by clicking the button. You should be taken directly to the support page …

Test the text widget to make sure you've set up everything correctly

(Test the clickable button)

Tip

Useful Tips:

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

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

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

Add A Clickable Contact Button To Your Sidebar Navigation Menu Using A Text Widget - open in new window

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

Adjust column width or reduce image size

(Adjust column width or reduce image size)

Extra Tips:

  • If you don’t want the image to be centered in your sidebar, delete the <center> and </center> tags from the beginning and end of the line of code. The image will then align to the left.
  • Link your contact button to any destination you want (e.g. to an external link, helpdesk, FAQ page, etc.) and change this anytime by editing the content in the widget.

Adding And Configuring WordPress Widgets In The Site

***

This is the end of section 2 of this tutorial about how to use WordPress widgets.

Click on this link to access the rest of this tutorial series:

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)

Originally published as How To Use And Configure WordPress Widgets – Part 2.