How To Use And Configure WordPress Widgets – Part 2

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

Using Widgets In WordPressIn Part 1 of this tutorial series, we explained the basics of using widgets in WordPress.

In this tutorial you will learn how to configure various widgets in WordPress.

How To Configure Frequently-Used WordPress Blog Sidebar Widgets

By default, your site comes with a number of preinstalled widgets, such as widgets that let you display external links, filter posts by categories, news items, adding a search box, etc.

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

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

Adding Widgets To The Blog Sidebar: Step-By-Step Tutorial

In this tutorial series, you are going to add, configure and reorder s number of widgets, including:

  • Adding a clickable Support graphic button linking visitors to the contact details page.
  • Adding a Categories section with a drop down menu.
  • Add a Recent Posts section.
  • Add a list of the site’s main Pages.
  • Display important Links on the sidebar section.
  • Adding an RSS Feed section.
  • Adding a Tag Cloud section.
  • Configure how your Archived Posts display on the sidebar navigation section.

The Widgets area is located in your WordPress dashboard and can be easily accessed from the administration menu by clicking on Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This opens the Widgets area in your web browser …

Widgets Area

(Widgets Section)

Let’s start to configure some widgets …

Text Widgets

Text widgets are incredibly versatile …

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 lets you insert just about anything you want into your sidebar or other widget sections, such as policies, maps and directions, special promotions and more to your site … just type in text or add HTML into the widget content area. You can also give the widget a title. Remember to save your settings when done …

A text widget is versatile

(A text widget is very useful!)

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

For this example, let’s set up a contact button on the 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 graphic image that you can use on your own site …

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

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

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

Step 1 – Upload your image.

Upload the button image to the images folder in your server and note the URL pointing to your server’s image location.

E.g. …

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

You will need this information in Step 3.

In order for visitors to go to the contact page when the graphic 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 link the button graphic to this URL in Step 3

Step 2 – Add your contact page.

Create a contact page and note down its URL …

Add A Support Button To The Sidebar Section 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. Basically, we just need to create the instructions linking your graphic image to your contact page.

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

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

  • 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 need to replace with your actual web addresses …

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

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:

Next, 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 in the location where your clickable button should display.

In the Available Widgets area, select a Text widget …

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

Drag and drop your Text widget

(Drag and drop your Text widget)

Step 5 – Configure the text widget.

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

WordPress text widget

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

Text widget

Info

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

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

If 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’re typing in formatted HTML content like we’re using in the example for this tutorial).

Here is some text with Automatically add paragraphs box not checked …

Automatically add paragraphs option not checked

(Automatically add paragraphs box not checked)

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

Automatically add paragraphs box checked

(Automatically add paragraphs box checked)

***

Step 6 – Refresh the web browser.

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

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

(Clickable support button widget on sidebar)

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

Step 7 – Test your widget.

The final step is to make sure that your destination URL works. Test the button to make sure that visitors will go to the help page when clicking the graphic image. You should be taken to the support page …

Test the clickable button to ensure it works

(Test the text widget)

Useful Tip

Tips:

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

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

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

Add A Clickable Support 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 your image does not exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. Note that some themes may display different column widths depending on their templates and layout. Some sidebars are wide and some are narrow. If the sidebar of your theme is narrower than the width of the graphic images, then you may have to either adjust the graphic size, or the width of your sidebar column to make images display correctly on your sidebar section.

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

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

Additional Tips:

  • If you don’t want to center the button inside your sidebar, delete the <center> and </center> tags from the beginning and end of the line of code. The image will then be aligned to its default settings (normally left-aligned).
  • Link the contact button to any destination you like (e.g. to an external site, contact form, support forum, etc.) and change this anytime by replacing the links inside your widget.

How To Add WordPress Widgets To The Site

***

This is the end of section 2 of this series of tutorials on using Widgets.

To view Part Three, click here:

***

"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie