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 The WordPress SidebarIn Part One of this step-by-step tutorial series, we explained the basics of how to use widgets in WordPress.

In this section you are going to begin configuring a number of frequently-used WordPress widgets.

Configuring Frequently-Used WordPress Sidebar Widgets

In a default WordPress installation, your site comes with several pre-installed widgets, such as widgets that let you display links to your site’s pages, filter posts by categories, newsfeeds, filter content by publish dates, etc.

By default, your site comes with several pre-installed widgets

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

Adding And Configuring Widgets On Your Sidebar: Tutorial

In this tutorial series, you will add, configure and reorder s number of WordPress widgets, including:

  • Add a Support Contact graphic button linking visitors to your contact page.
  • Add a Categories section.
  • Add a Recent Posts section.
  • Adding a list of Pages.
  • Display Links on the sidebar menu.
  • Display news items using an RSS Feed section.
  • Add a Tag Cloud.
  • Configure how your Archived Posts display on your sidebar section.

To use widgets, access the Widgets panel located inside the administration by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This loads the Widgets panel into your browser window …

Widgets Screen

(Widgets Section)

Let’s start configuring your sidebar menu widgets …

Adding Text Widgets

Text widgets are incredibly useful …

Text widget

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

A text widget can be used to add events, images, scripts and more to your site … just type in text or add HTML into the widget 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 versatile!)

Example: Use A Text Widget To Add A Clickable Help Button To Your Sidebar Area

For this example, we’ll set up a clickable contact button on your sidebar that takes 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 Support Button To Your Sidebar Navigation Menu

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

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

Step 1 – Upload your image.

To display the clickable image on your site, you must first upload the button image to the images folder in your server and note 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 someone to go to your contact page when the support button is 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 a contact page.

Create a contact page and note the page URL …

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

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, you just need to create the instructions linking your graphic image to the contact page/helpdesk.

Your code can be typed into a simple text file and should look something like this …

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

  • 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 with the URL of your image location.

The screenshot below shows which sections of the above code you need to replace with your actual web addresses …

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

Replace the above URLs and then copy all of your text file content to your clipboard when finished.

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

Now, go back to your Widgets area …

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 the Text widget to your Active Widgets section and release the widget at the top of the Widget Area

Drag and drop your Text widget

(Drag-and-drop your WordPress text widget)

Step 5 – Configure your widget settings.

Click on the Text widget title bar to configure its settings. Paste the code with the URLs 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 the widget if you want (e.g. “Need Help?”, “Support”, etc.) and paste the code with the correct destination links into the large text box, then click Save when done …

WordPress text widget

Important Info

Note: Remember to check all links 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: this is not necessary if you type 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 not selected …

Automatically add paragraphs option not ticked

(Automatically add paragraphs box not checked)

Here is some text with Automatically add paragraphs box checked …

Automatically add paragraphs box checked

(Automatically add paragraphs option selected)

***

Step 6 – Refresh your web browser.

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

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

(Clickable button widget on sidebar)

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

Step 7 – Test the button.

The last step is to make sure that your links work. Test this by clicking the help button. If you are taken directly to the contact page, then everything has been set up correctly …

Test your text widget to ensure it works

(Test the text widget)

Useful Tip

Text Widgets – Useful Tips:

If you want a new browser window to open up when visitors go to the contact page (so they don’t leave the page they’re in), then change the button code from this:

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

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

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

When choosing images for your sidebar navigation menu, 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. Note that some themes can display different column widths depending on their templates and their 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 need to either adjust the size of your images, or the width of your sidebar column to make elements display correctly on your sidebar.

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

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

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 code. The image will then be left-aligned.
  • You can link the support button to any URL you like (e.g. to an external site, contact form, support forum, etc.) and change this anytime by replacing the links in your text widget.

Configuring Widgets On The WordPress Sidebar

***

This is the end of part two of this series of tutorials.

To view Part Three, click this link:

***

"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now