Blog

How To Use And Configure WordPress Widgets – Part 2

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

Using Widgets In WordPressIn Part One of this tutorial, we cover the basics of how to use widgets in WordPress.

In this tutorial you will learn how to configure various sidebar widgets in WordPress.

Configuring Widgets

By default, your site comes with several pre-installed 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, news items, add site search features, etc.

In a default WordPress installation, your site comes with several pre-installed widgets

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

How To Configure Sidebar Widgets: Step-By-Step Tutorial

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

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

The Widgets screen is located inside your WordPress 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 Area

(Widgets Section)

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

Add A Text Widget

Text widgets are incredibly versatile …

Text widget

(WordPress 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)

Text widgets can be used to add single lines or paragraphs of text, social media buttons, scripts and more to your site … simply type in text or paste HTML into the content area. You can also add an optional title in the Title field. Remember to save your settings …

Text widgets are versatile

(A text widget is very useful!)

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

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

Use A Text Widget To Add A Help Button To Your Sidebar Navigation Area

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

Use A Text Widget To Add A Help Button To Your Sidebar Navigation Area

Step 1 – Upload your image.

To display the image on your site, the graphic image must be uploaded to your server. Upload your button image to the images folder in your server and note the path to your image location.

For example …

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

You will use this information in Step 3.

For someone to be taken to your contact page when they click on the graphic button, 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 a support page.

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

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

Step 3 – Create the 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. Basically, we just need to create the instructions linking the graphic image to the destination URL.

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

Add A Support Button To The Sidebar Area 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 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 Support Button To The Sidebar Section 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, see this tutorial:

Next, go back into your Widgets screen …

Activate or deactivate widgets using drag & drop

(Widgets Area)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar in the location where the button should display.

In the Available Widgets area, find a Text widget …

Text widget

(Text widget)

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

Dragging and dropping your Text widget

(Drag and drop your WordPress text widget)

Step 5 – Configure your text widget.

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

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 Save when done …

WordPress text widget

Important

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

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

If you’re adding text with no formatting tags, 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’re typing 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 box not checked

(Automatically add paragraphs box not checked)

Here is some text with Automatically add paragraphs option selected …

Automatically add paragraphs box ticked

(Automatically add paragraphs option selected)

***

Step 6 – Refresh your web browser.

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

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

(Clickable button widget on sidebar)

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

Step 7 – Test your button.

The last step is to ensure that the links work. Test the button to make sure that visitors will go to the help page when they click on the graphic image. If you are taken to your contact page, then everything has been set up correctly …

Test your text widget

(Test the clickable button)

Practical Tip

Text Widgets – Useful Tips:

If you would like your support page to display inside a new browser window when visitors click on the support (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 Support Button To The Sidebar Menu

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

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

When adding images to your sidebar menu, make sure that the width of your image does not exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. As we’ve previously explained, 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 is narrower than the width of your button image, then you may have to either adjust the graphic size, or the column width to make the images display correctly on your sidebar area.

Adjust column width or reduce image size

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

Extra Tips:

  • If you don’t want the button to be centered inside your sidebar, delete the <center> and </center> tags from the beginning and end of the line of code. The image will then be left-aligned.
  • Link the contact button to any URL you want (e.g. to an external site, helpdesk, forum, etc.) and change this anytime by replacing the links inside the widget.

How To Add And Configure WordPress Widgets In Your Sidebar Menu

***

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

To view the rest of this tutorial, click this link:

***

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