How To Use And Configure WordPress Widgets – Part 2

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

Adding Widgets To The SidebarIn Part One of this tutorial, we explained the basics of how to use WordPress widgets.

In this tutorial you will configure various WordPress widgets.

Widget Configuration

By default, your site comes with several built-in widgets that can be used out of the box with little to no configuration needed, such as widgets for displaying external links, filter posts by categories, text or HTML banners, adding tag clouds, etc.

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

(In a default WordPress installation, your site comes with several built-in widgets)

Configuring Widgets On Your Blog Sidebar: Step-By-Step Tutorial

In this step-by-step tutorial, you are going to add, configure and reorder various commonly-used WordPress widgets to display in the site’s sidebar area, including:

  • Add a clickable Contact Us button linking to the contact page.
  • Add a Categories section with a drop down menu.
  • Adding a Recent Posts section to display the latest posts.
  • Add a list of the site’s most important Pages.
  • Display useful Links on your sidebar navigation menu.
  • Display newsfeeds using an RSS Feed section.
  • Add a list of clickable tags using a Tag Cloud.
  • Configure how Archived Posts display on your sidebar.

The Widgets section is located inside your WP admin area and can be easily accessed from the WordPress dashboard menu by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets section into your web browser …

Widgets Area

(Widgets Area)

Let’s get started …

Text Widgets

Text widgets are versatile …

WordPress Text widget

(Text widget)

Important

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 email and contact information, videos, scripts and more to your site … simply type in text or insert HTML into the content area. You can also give the widget a title. Remember to save your settings …

Text widgets are very useful

(A text widget is extremely versatile!)

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

For this example, we’ll set up a clickable contact button on the sidebar that will take 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 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 navigation menu like in the example shown below …

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

Step 1 – Upload your image.

To display the clickable button image on your site, the graphic image must be uploaded to your server. Upload the button image to your server and write down the path to your 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 they click on the help button, 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 and note down its URL …

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

Step 3 – Create the code for your text widget.

Don’t worry … this sounds a lot more technical than it is. In simple terms, we just need to create the instructions for your clickable button.

Your instructions can be typed in a plain text file and should look something like this …

Using A Text Widget To Add A Clickable Help Button To Your Sidebar Navigation 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 above with the URL of your image location.

The image below shows the sections of the above sample code that you need to replace with your actual contact page and image URLs …

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

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

If you need help with basic HTML code, see 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 clickable button should display.

In the Available Widgets area, select the Text widget …

WordPress text widget

(WordPress text widget)

Drag your 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

(Dragging and dropping your WordPress text widget)

Step 5 – Configure the text widget.

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

Text widget

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

Text widget

Info

Note: Make sure to check all links before pasting scripts into the Text Widget, or the button won’t work.

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

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

Here is some text with Automatically add paragraphs option not ticked …

Automatically add paragraphs box not checked

(Automatically add paragraphs box unchecked)

Here is some text with Automatically add paragraphs option checked …

Automatically add paragraphs box checked

(Automatically add paragraphs option checked)

***

Step 6 – Refresh the web browser.

Once you have added your text widget and code content, go to your site and refresh the browser. If all links have been entered correctly, then your clickable support button should display in the sidebar menu …

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

(Clickable support button widget on blog sidebar)

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

Step 7 – Test the button.

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

Test the text widget to ensure it works

(Test the clickable button to ensure you’ve set everything up correctly)

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 text widget code from this:

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

To this (i.e. add the part that says: target=”_blank” in the text widget code):

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

When choosing images to add to your sidebar section, make sure that the width of your image does not exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. Note that some themes may display elements differently 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 your button image, then you may have to either adjust the size of your images, or the column width to make images display correctly on your sidebar area.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

More Tips:

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

How To Add Widgets To The WordPress Sidebar

***

This is the end of section two of this tutorial series about how to use Widgets.

Click here to keep reading:

***

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