How To Use And Configure WordPress Widgets – Part 2

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

Adding WordPress Widgets To The Sidebar MenuIn Part 1 of this tutorial series, we explained the basics of how to use widgets in WordPress.

In this tutorial you are going to begin configuring several widgets in WordPress.

Configuring Sidebar Widgets

By default, your site comes with several pre-installed active widgets, such as widgets for displaying external links, recent posts, RSS feed content, filter content by tags, etc.

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

(By default, your site comes with several pre-installed widgets)

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

In this step-by-step tutorial, you will learn how to add, configure and reorder various WordPress widgets to display in your site’s sidebar, including:

  • Add a clickable Help image linking visitors to your support page.
  • Add a Categories section with a drop down menu.
  • Add a Recent Posts section.
  • Adding a list of Pages.
  • Display a list of useful Links on your sidebar menu.
  • Display news items using an RSS Feed section.
  • Add a Tag Cloud section.
  • Configure how Archived Posts display on the sidebar navigation menu.

To use widgets, access the Widgets panel located inside your administration by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This loads the Widgets panel in your web browser …

Widgets Area

(Widgets Panel)

Let’s get started …

Adding Text Widgets

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)

Text widgets can be used to add lists of favorite items, videos, forms and more to your site … just type in text or insert HTML into the content area. You can also give the widget a title. Remember to save your settings …

A text widget is very useful

(Text widgets are very useful!)

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

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

Use A Text Widget To Add A Contact Button To Your Sidebar Navigation Section

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

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

Step 1 – Upload your image.

To display the clickable button image on your site, the image must be uploaded to your server. Upload your button graphic to your server and write down the URL pointing to your image location.

E.g. …

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

You will use this information in Step 3.

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

Step 2 – Add the destination page.

Create a contact page on your site and note the page URL …

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

Step 3 – Create the code for your text widget.

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

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

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

  • 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 the sections of the above code that you will need to replace with your actual web addresses …

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

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 into your Widgets section …

Activate or deactivate widgets using drag & drop

(Widgets Panel)

Step 4 – Add a Text widget.

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

In the Available Widgets area, select a Text widget …

WordPress text widget

(Text widget)

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

Dragging and dropping your Text widget

(Drag and drop your WordPress text widget)

Step 5 – Configure the widget settings.

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

Text widget

Add a title 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 …

WordPress text widget

Important Info

Note: Remember to check all links before pasting scripts into your Text Widget, or your clickable button will not 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: not required if you paste in HTML code like we’re using in the example for this tutorial).

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

Automatically add paragraphs option not selected

(Automatically add paragraphs box not checked)

Here is some text with Automatically add paragraphs option ticked …

Automatically add paragraphs option selected

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh your browser.

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

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

(Clickable button widget on blog sidebar)

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

Step 7 – Test your widget.

The final step is to make sure that the clickable button works. Test your button to make sure that visitors will go to the help page when they click on the button. You should be taken to your support page …

Test the text widget

(Test your clickable button)

Useful Tip

Tips:

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

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

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

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

When inserting images into your sidebar area, 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 we’ve previously explained, some themes may display elements differently depending on their templates and their layout. Some sidebars may be too wide or too narrow. If your theme’s sidebar 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 the images display correctly on your sidebar.

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

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

Extra Tips:

  • If you don’t want to center the button in 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.
  • Link the contact button to any destination you like (e.g. to an external site, contact form, forum, etc.) and change this anytime by editing the content in the text widget.

Using Widgets

***

This is the end of part 2 of this tutorial about using Widgets.

To keep reading, click this link:

***

"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum