How To Use And Configure WordPress Widgets – Part 2

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

Adding And Configuring Widgets On Your Sidebar Navigation AreaIn Part 1 of this tutorial, we cover the basics of using WordPress widgets.

In this tutorial you will begin configuring various widgets in WordPress.

How To Configure Widgets

In a default WordPress installation, your site comes with a number of pre-installed widgets that can be used out of the box with minimal to no configuration needed, such as widgets for displaying links to your site’s pages, filter posts by categories, news items, add a search box, etc.

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

(In a default WordPress installation, your site comes with a number of preinstalled widgets)

How To Set Up Commonly-Used WordPress Sidebar Widgets In WordPress: Tutorial

In this tutorial, you are going to add, configure and reorder various frequently-used WordPress widgets to display in your site’s sidebar navigation menu, including:

  • Add a clickable Support Contact button linking to the support page.
  • Add a Categories section.
  • Adding a Recent Posts section.
  • Adding a list of the site’s main Pages.
  • Display useful Links on the sidebar navigation section.
  • Display news items using an RSS Feed section.
  • Adding a Tag Cloud section.
  • Add and configure an Archives section to your sidebar.

To access the Widgets area go to Appearance > Widgets …

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets panel in your browser …

Widgets Screen

(Widgets Area)

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

Adding Text Widgets To Your Blog Sidebar

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 the sidebar or other widget sections, such as lists, maps and directions, forms and more to your site … just by typing in text or inserting HTML into the content area. You can also give the widget a title. Remember to save your settings …

Text widgets are really useful

(A text widget is versatile!)

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

For this example, let’s set up a help button on your sidebar navigation menu 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, you will need to create or source a “help button” graphic image that visitors can click on …

Add A Clickable Support Button To Your Sidebar Navigation Area 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 Support Button To Your Sidebar Area Using A Text Widget

Step 1 – Upload your image.

To display an image on your site, first you must upload the image to your server’s images folder and note the address of your server’s image location.

E.g. …

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

You will need this information in Step 3.

For someone to go 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 link the button image to this URL in Step 3 …

Step 2 – Add your contact page.

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

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

Step 3 – Compose the HTML code for your text widget.

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 the contact page.

Your instructions can be typed in a simple text editor and should look something like this …

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

  • 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 which sections of the above sample code you will need to replace with the actual contact page and image URLs …

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

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:

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 where you would like the support button to display.

In the Available Widgets area, select a Text widget …

WordPress text widget

(WordPress text widget)

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

Drag-and-drop your Text widget

(Dragging and dropping your WordPress text widget)

Step 5 – Configure your text widget.

Click on the widget title bar to configure its 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 …

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 URLs into the Content box, then click the save button …

WordPress text widget

Useful Information

Note: Remember to check all URLs before pasting scripts into the Text Widget, or the 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 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 checked …

Automatically add paragraphs option not checked

(Automatically add paragraphs box not selected)

Here is some text with Automatically add paragraphs box ticked …

Automatically add paragraphs box checked

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh the browser.

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

Add A Contact Button To Your Sidebar Menu Using A Text Widget

(Clickable button widget on blog sidebar)

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

Step 7 – Test the button.

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

Test the clickable button

(Test your text widget to ensure it works)

Tip

Text Widgets – Useful Tips:

If you would like your support 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 button code from this:

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

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

Add A Clickable Help Button To The Sidebar Area Using A Text Widget - open in new window

When adding images to 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 can 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 the graphic images, then you may have to either adjust the graphic size, or the column width to make images display correctly on your sidebar.

Adjust column width or reduce image size

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

More Tips:

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

Adding And Configuring WordPress Widgets In Your Blog

***

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

To continue reading, click here:

***

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