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 And Configure Widgets In WordPressIn Part One of this step-by-step tutorial, we cover the basics of using widgets in WordPress.

In this section you are going to begin configuring various WordPress widgets.

How To Configure Widgets

By default, your site comes with several preinstalled active widgets, such as widgets that let you display links to your site’s pages, recent posts, news items, filter content by tags, etc.

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

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

How To Set Up Sidebar Widgets In WordPress In WordPress: Step-By-Step Tutorial

In this step-by-step tutorial, we will add, configure and reorder various widgets to display in your site’s sidebar, including:

  • Add a clickable Contact Us image linking visitors to the help page.
  • Adding a Categories section.
  • Add a Recent Posts section.
  • Adding a list of the site’s Pages.
  • Display important Links on the sidebar navigation menu.
  • Display news items with an RSS Feed section.
  • Add a Tag Cloud section.
  • Configure how Archived Posts display on your sidebar navigation section.

The Widgets screen is located in your WordPress administration area and can be easily accessed from the admin menu by choosing Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This opens the Widgets screen into your browser …

Widgets Screen

(Widgets Area)

Let’s get started …

Adding Text Widgets

Text widgets are quite useful …

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)

Text widgets can be used to add lists, images, reviews and more to your site … just 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 very useful

(A text widget is really versatile!)

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

For this example, we’ll set up a clickable 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 graphic image that you can use on your own site …

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

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

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

Step 1 – Upload your image.

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

E.g. …

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 support button is clicked, you will need to either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link the button graphic to this URL in Step 3

Step 2 – Create your contact page.

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

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

Step 3 – Create the code for your text widget.

Don’t worry … this sounds a lot more technical than it is. Basically, we just need to create the instructions linking your graphic image to your contact page.

Your code can be composed in a simple text file and will look something like this …

Use A Text Widget To Add A Clickable Support Button To The 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 screenshot below shows the sections of the above sample code that you need to replace with your actual contact details …

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

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, see this tutorial:

Go back to your Widgets area …

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 support button should display.

In the Available Widgets area, select the Text widget …

WordPress text widget

(Text widget)

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

Dragging and dropping your WordPress text widget

(Drag and drop your WordPress text widget)

Step 5 – Configure the text widget.

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

Text widget

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

WordPress text widget

Important

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

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

If you’re 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’re pasting in formatted HTML code like we’re doing in this tutorial).

Here is some text added to a Text widget with Automatically add paragraphs option unchecked …

Automatically add paragraphs option unchecked

(Automatically add paragraphs box not selected)

Here is some text added to a Text widget with Automatically add paragraphs option ticked …

Automatically add paragraphs option ticked

(Automatically add paragraphs box checked)

***

Step 6 – Refresh your web browser.

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

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

(Clickable button widget on sidebar)

The above screenshot shows the contact button added to a brand new WordPress site.

Step 7 – Test your button.

The last step is to make sure that the clickable button works. 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 directly to the contact page, then your text widget has been set up correctly …

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

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

Tip

Text Widgets – Useful Tips:

If you would like the contact 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 text widget code from this:

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

To this (i.e. insert the section that says: target=”_blank” in your html code):

Add A Clickable Support Button To The Sidebar Navigation Menu Using A Text Widget - open in new window

When choosing images for your sidebar menu, make sure that the width of your image doesn’t 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 their layout. Some sidebars may be too wide or too narrow. If the sidebar of your theme is narrower than the width of the button images, then you may need to either adjust the size of your images, or the column width to make elements display correctly on your sidebar.

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

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

More Tips:

  • If you don’t want to center your image in the sidebar, delete the <center> and </center> tags from the beginning and end of the HTML code. The image will then be aligned to its default settings (normally left-aligned).
  • You can link your help button to any URL you want (e.g. to an external link, contact form, FAQ page, etc.) and change this anytime by replacing the code in the text widget.

Adding WordPress Widgets To The Website

***

This is the end of section two of this tutorial.

Click here to continue:

***

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