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 Widgets To Your WordPress Blog Sidebar SectionIn Part One of this tutorial, we explained the basics of how to use WordPress widgets.

In this tutorial you are going to configure several WordPress widgets.

Widget Configuration

In a default WordPress installation, your site comes with several preinstalled active widgets, such as widgets for displaying links to your site’s pages, recent posts, text or HTML banners, adding site search features, etc.

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

(In a default WordPress installation, your site comes with several active widgets)

Adding Sidebar Widgets In WordPress: Step-By-Step Tutorial

In this tutorial series, we are going to add, configure and reorder a number of commonly-used WordPress widgets to display in the site’s sidebar navigation section, including:

  • Adding a Support button linking to your help page.
  • Add a Categories section.
  • Add a Recent Posts section.
  • Add a list of Pages.
  • Display useful Links on the sidebar.
  • Add an RSS Feed section.
  • Add a Tag Cloud.
  • Configure how Archived Posts display on your sidebar.

The Widgets section is located inside the WordPress administration area and can be easily accessed from the WordPress administration menu by selecting Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This loads the Widgets section in your web browser …

Widgets Section

(Widgets Section)

Let’s configure WordPress text widgets …

Adding Text Widgets To The Sidebar Menu

Text widgets are incredibly useful …

Text widget

(Text widget)

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 instructions, images, messages and more to your site … just by typing in text or adding HTML into the widget content area. You can also give the widget a title. Remember to save your settings …

Text widgets are really useful

(A text widget is really versatile!)

Example: Use A Text Widget To Add A Support Button To Your Sidebar Menu

For this example, let’s set up a clickable contact button on your sidebar navigation 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 graphic image that visitors can click on …

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

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

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

Step 1 – Upload your image.

Upload the graphic image to the images folder in your server and note down the address of your image location.

For example …

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

You will use this information in Step 3.

For visitors to be taken to your contact page when the help button gets clicked, either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will then link the button image to this URL in Step 3

Step 2 – Create the support page.

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

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

Step 3 – Create 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 button.

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

Use A Text Widget To Add A Clickable Help Button To Your Sidebar 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 above 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 contact details …

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

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

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

Go back to 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 in the location where your button should display.

In the Available Widgets area, find a Text widget …

Text widget

(Text widget)

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

Dragging and dropping your WordPress text widget

(Drag-and-drop your Text widget)

Step 5 – Configure your 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 the save button …

Text widget

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

Text widget

Useful Information

Note: Remember to test your contact page and 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: this is not necessary if you paste in formatted HTML content like we’re using in the example for this tutorial).

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

Automatically add paragraphs option not selected

(Automatically add paragraphs option unchecked)

Here is some text with Automatically add paragraphs box ticked …

Automatically add paragraphs option checked

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh your browser.

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

Use A Text Widget To Add A Clickable Help Button To The Sidebar Section

(Clickable support button widget on blog sidebar)

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

Step 7 – Test your widget.

The final step is to make sure that your destination link works. Test this by clicking the button. You should be taken directly to your contact page …

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

(Test your clickable button)

Useful Tip

Tips:

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

Use A Text Widget To Add A Clickable Support Button To The Sidebar Navigation Area

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

Add A Help Button To Your Sidebar Menu Using A Text Widget - open in new window

When choosing images for your sidebar section, make sure that the width of the image does not exceed the width of your 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 layout. Some sidebars are wide and some are narrow. If your theme’s sidebar width 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 the images display correctly on your theme.

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

(Adjust column width or reduce image size)

More Tips:

  • If you don’t want to center your button image in 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 your support button to any destination you like (e.g. to an external link, helpdesk, FAQ page, etc.) and change this anytime by editing the links in your text widget.

How To Use Widgets In WordPress

***

This is the end of section two of this series of tutorials on using WordPress widgets.

To continue, click here:

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org