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 SiteIn Part One of this tutorial series, we explained the basics of using WordPress widgets.

In this tutorial you are going to configure a number of WordPress sidebar widgets.

How To Configure Frequently-Used WordPress Sidebar Widgets

In a default WordPress installation, your site comes with a number of built-in widgets, such as widgets for displaying external links, recent posts, news items, add tag clouds, etc.

In a default WordPress installation, your site comes with several built-in widgets

(By default, your site comes with a number of built-in widgets)

How To Add Widgets To The Sidebar: Tutorial

In this tutorial series, you are going to learn how to add, configure and reorder s number of WordPress widgets to display in your site’s sidebar, including:

  • Adding a clickable Help button linking to the contact details page.
  • Add a Categories section.
  • Add a Recent Posts section.
  • Add a list of Pages.
  • Display Links on the sidebar section.
  • Display the latest news using an RSS Feed section.
  • Add a Tag Cloud section.
  • Adding and configuring an Archives section to the sidebar navigation menu.

The Widgets panel is located inside the WP dashboard and can be easily accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets area in your browser …

Widgets Panel

(Widgets Screen)

Let’s begin by configuring text widgets …

Add A Text Widget To Your Blog Sidebar

Text widgets are incredibly versatile …

WordPress Text widget

(WordPress 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)

Text widgets can be used to add quotes, images, special promotions and more to your site … just 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 …

Text widgets are extremely versatile

(A text widget is really useful!)

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

For this example, we’ll set up a clickable support button on the sidebar that will take 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 graphic image that your visitors can click on …

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

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

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

Step 1 – Upload your image.

To display the image on your site, first you must upload the graphic image to a folder on your server and note the URL pointing to your image location.

For example …

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

This information will be required in Step 3.

For visitors to be taken to the contact page when the support button gets clicked, you must 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 destination page.

Create a contact page and note its URL …

Use A Text Widget To Add A Clickable Support Button To Your Sidebar Section

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

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

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

Add A Clickable Support Button To Your Sidebar Navigation 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 code that you will need to replace with your actual contact details …

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

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

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

Now, go back to your Widgets panel …

Activate or deactivate widgets using drag-and-drop

(Widgets Screen)

Step 4 – Add a Text widget.

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

In the Available Widgets area, find the Text widget …

Text widget

(Text widget)

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

Dragging and dropping your Text widget

(Dragging and dropping 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 title to the widget if you want (e.g. “Need Help?”, “Get Support”, etc.) and paste the code with the correct URLs into the text area, then click the save button …

Text widget

Important Info

Note: Make sure 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 without formatting tags like paragraph breaks, 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 paste in HTML content like we’re using in the example for this tutorial).

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

Automatically add paragraphs box not ticked

(Automatically add paragraphs option unchecked)

Here is some text with Automatically add paragraphs box selected …

Automatically add paragraphs box selected

(Automatically add paragraphs option ticked)

***

Step 6 – Refresh the web browser.

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

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

(Clickable support button widget on blog sidebar)

The above screenshot shows the contact button in the sidebar navigation area of a brand new WordPress site.

Step 7 – Test your button.

The last step is to ensure that your destination URL works. Test the button to make sure that your visitors will go to your support page when they click on the graphic image. You should be taken directly to the contact page …

Test your clickable button

(Test your clickable button)

Useful Tip

Tips:

If you want your support page to open inside a new 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:

Use A Text Widget To Add A Clickable Support Button To Your Sidebar Section

To this (i.e. add the part containing target=”_blank” in the code):

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

When choosing images to add to your sidebar navigation menu, make sure that the width of your 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 may display different column widths depending on their templates and their layout. Some sidebars are wide and some are narrow. If the sidebar of your theme is narrower than the width of your graphic images, then you may have to either adjust the graphic size, or the width of your sidebar column to make graphics display correctly on your sidebar.

Adjust column width or reduce image size

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

Additional Tips:

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

How To Add And Configure Widgets In WordPress

***

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

To view the rest of this tutorial series, click this link:

***

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