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

In this section you are going to begin configuring a number of sidebar widgets in WordPress.

Sidebar Widget Configuration

In a default WordPress installation, your site comes with several built-in active widgets, such as widgets that let you display links to your pages, filter posts by categories, newsfeeds, filter content by publish dates, etc.

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

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

How To Configure Frequently-Used WordPress Sidebar Widgets: Tutorial

In this step-by-step tutorial series, you will learn how to add, configure and reorder various WordPress widgets, including:

  • Adding a clickable Help graphic linking to the contact page.
  • Add a Categories section.
  • Adding a Recent Posts section to display your latest posts.
  • Add a list of your site’s main Pages.
  • Display Links on the sidebar.
  • Add an RSS Feed section.
  • Add a list of clickable tags with a Tag Cloud.
  • Adding and configuring an Archives section to the sidebar navigation section.

The Widgets section can be easily accessed inside the administration by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets panel in your web browser …

Widgets Panel

(Widgets Screen)

Let’s start by configuring text widgets …

Add A Text Widget To Your Blog Sidebar

Text widgets are quite useful …

WordPress Text widget

(Text widget)

Useful 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 can be used to add single lines or paragraphs of text, image links, reviews and more to your site … just by typing in text or inserting HTML into the widget content area. You can also give the widget a title. Remember to save your settings …

Text widgets are really versatile

(Text widgets are extremely versatile!)

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

For this example, we’ll set up a clickable help button on your sidebar section 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, create or source a graphic image that your visitors can click on …

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

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

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

Step 1 – Upload your image.

To display the image on your site, the button image must be uploaded to your server. Upload the button 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.

In order for someone to be taken to the contact page when the graphic button is clicked, you must either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link your button image to this URL in Step 3

Step 2 – Add your support page.

Create a contact page on your site and note down its URL …

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

Step 3 – Compose your text widget code.

If you’re not a technical-minded person, don’t worry … this sounds a lot more technical than it is. In simple terms, we just need to create the instructions linking the button image to your contact page.

Your code can be composed in a plain text editor and will look something like this …

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

  • 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 with the URL of your image location.

The screenshot below shows which sections of the above code you will need to replace with the actual contact page and image URLs …

Add A Contact Button To Your Sidebar Menu 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:

Next, go back into your Widgets section …

Activate or deactivate widgets using drag-and-drop

(Widgets Area)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar in the location where the clickable 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

Drag-and-drop your WordPress text widget

(Drag and drop your Text widget)

Step 5 – Configure your widget settings.

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

Text widget

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

Text widget

Info

Note: Make sure to test your contact page and button image URLs before pasting scripts into the Text Widget, or your button will not work.

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

If adding text without 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 pasting in HTML content like we’re doing in this tutorial).

Here is some text with Automatically add paragraphs box unchecked …

Automatically add paragraphs option not selected

(Automatically add paragraphs option unchecked)

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

Automatically add paragraphs box ticked

(Automatically add paragraphs option ticked)

***

Step 6 – Refresh your web browser.

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

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

(Clickable support button widget on sidebar)

The above screenshot shows a clickable button in the sidebar of a brand new WordPress site.

Step 7 – Test the widget.

The final step is to ensure that the clickable button works. Test the button to make sure that your visitors will go to the contact page when they click on the graphic image. If you are taken directly to your contact page, then your text widget has been set up correctly …

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

(Test the text widget)

Useful Tip

Text Widgets – Useful Tips:

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

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

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

Use A Text Widget To Add A Support Button To Your Sidebar Navigation Menu - open in new window

When choosing images for your sidebar menu, 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 we’ve previously mentioned, some themes can display elements differently depending on their templates and their layout. Some sidebars may be too wide or too narrow. If your theme’s sidebar width is narrower than the width of the graphic images, then you may need to either adjust the image size, or the width of your sidebar column to make graphics display correctly on your sidebar area.

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

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

More Tips:

  • If you don’t want to center the button image inside your sidebar, delete the <center> and </center> tags from the beginning and end of the HTML code. The image will then align to the left.
  • You can link the contact button to any URL you want (e.g. to an external link, contact form, forum, etc.) and change this anytime by editing the code inside your text widget.

How To Add WordPress Widgets To The Website

***

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

To view the rest of this tutorial, 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