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 Your BlogIn Part 1 of this tutorial series, we cover the basics of how to use widgets in WordPress.

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

How To Configure Commonly-Used WordPress Widgets

By default, your site comes with several preinstalled widgets that can be used out of the box with little to no configuration required, such as widgets that let you display links to your pages, filter posts by categories, newsfeeds, filter content by tags, etc.

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

(By default, your site comes with several active widgets)

Setting Up Widgets On The Blog Sidebar: Tutorial

In this tutorial, you will learn how to add, configure and reorder various commonly-used widgets, including:

  • Adding a Support Contact image linking to your help page.
  • Adding a Categories section.
  • Add a Recent Posts section.
  • Adding a list of your site’s most important Pages.
  • Display useful Links on your sidebar.
  • Adding an RSS Feed section.
  • Add a list of clickable tags with a Tag Cloud.
  • Configure how your Archived Posts display on the sidebar navigation section.

The Widgets area is located in the WP dashboard and can be accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets screen in your browser …

Widgets Screen

(Widgets Area)

Let’s start by learning how to configure WordPress text widgets …

Add A Text Widget To The Sidebar

Text widgets are versatile …

Text widget

(WordPress 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 the sidebar or other widget sections, such as events, maps and directions, special promotions and more to your site … just by typing in text or inserting 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 versatile

(Text widgets are really useful!)

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

For this example, let’s set up a help button on the sidebar navigation area that takes 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 …

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

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

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

Step 1 – Upload your image.

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

E.g. …

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

This information will be used in Step 3.

In order for visitors to be taken to your contact page when the help button gets clicked, you will need to 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 a destination page.

Create a contact page and note down its URL …

Add A Clickable Help Button To The Sidebar Navigation Area 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. In simple terms, you just need to create the instructions for your clickable image.

Your instructions can be written a plain text file and will look something like this …

Add A Clickable Support Button To Your Sidebar Navigation Menu 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 screenshot below shows which sections of the above sample code you need to replace with your actual contact page and image URLs …

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

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

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

Next, go back into your Widgets section …

Activate or deactivate widgets using drag-and-drop

(Widgets Panel)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar where you would like your clickable button to display.

In the Available Widgets area, find the Text widget …

WordPress text widget

(WordPress text widget)

Drag the 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 your text widget settings.

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

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 text area, then click Save when done …

Text widget

Important Info

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

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

If you’re adding text without formatting tags, you may want to tick the Automatically add paragraphs box to wrap each block of text in paragraphs (note: not required if you’re pasting in code like we’re doing in this tutorial).

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

Automatically add paragraphs box not selected

(Automatically add paragraphs option not selected)

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

Automatically add paragraphs box checked

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh your web browser.

After adding your text widget and HTML code, visit the front-end of your site and refresh the browser. If you have entered all of the links correctly, then the clickable support button will display at the top of your sidebar menu …

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

(Clickable button widget on blog sidebar)

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

Step 7 – Test the button.

The final step is to make sure that the clickable button works. Test this by clicking the button. You should be taken to your support page …

Test the text widget

(Test the clickable button)

Useful Tip

Tips:

If you want a new window to open up when visitors go to the support page (so they don’t leave the page they’re on), then change the code from this:

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

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

Using A Text Widget To Add A Clickable Help Button To The Sidebar Section - 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 mentioned, some themes may display different column widths depending on their templates and their layout. Some sidebars may be too wide or too narrow. If the sidebar of your theme is narrower than the width of your graphic images, then you may have to either adjust the size of your images, or the column width to make elements display correctly on your sidebar section.

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

(Adjust column width or reduce image size)

Extra Tips:

  • If you don’t want to center the 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.
  • Link your support button to any URL you want (e.g. to an external site, helpdesk, support forum, etc.) and change this anytime by replacing the code in the text widget.

Adding And Configuring WordPress Widgets In The Sidebar Section

***

This is the end of section 2 of this series of tutorials.

To continue reading, 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