How To Use And Configure WordPress Widgets – Part 2

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

Using WidgetsIn Part One of this step-by-step tutorial, we explained the basics of how to use WordPress widgets.

In this tutorial you are going to learn how to configure several sidebar widgets in WordPress.

Configuring Sidebar Widgets

In a default WordPress installation, your site comes with a number of preinstalled active widgets, such as widgets for displaying links to your site’s pages, filter posts by categories, RSS feed content, adding 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 built-in widgets)

Adding And Configuring Widgets On The WordPress Sidebar Area: Step-By-Step Tutorial

In this step-by-step tutorial, you will learn how to add, configure and reorder s number of WordPress widgets, including:

  • Adding a Help graphic button linking visitors to your help page.
  • Add a Categories section with a drop down menu.
  • Add a Recent Posts section.
  • Adding a list of the site’s main Pages.
  • Display Links on the sidebar menu.
  • Display news items with an RSS Feed section.
  • Add a list of clickable tags with a Tag Cloud section.
  • Adding and configuring an Archives section to the sidebar.

To use widgets, access the Widgets area located inside the dashboard by going to Appearance > Widgets …

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This loads the Widgets screen in your browser …

Widgets Area

(Widgets Panel)

Let’s get started …

Add A Text Widget To The Blog Sidebar

Text widgets are quite useful …

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)

Text widgets let you insert just about anything you want into the sidebar menu or other widget sections, such as notices, image links, special promotions and more to your site … simply by typing in text or inserting 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 really versatile

(Text widgets are very useful!)

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

For this example, we’ll set up a support button on the sidebar area 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, create or source a graphic image that you will use on your own site …

Using A Text Widget To Add A Contact Button To Your Sidebar Navigation Area

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

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

Step 1 – Upload your image.

To display the clickable button image on your site, the graphic image must be uploaded to your server. Upload your button graphic to a folder on your server and note down the URL pointing to your image location.

E.g. …

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

This information will be used in Step 3.

For someone to go to the contact page when they click on the help button, you must 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 – Add a contact page.

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

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

Step 3 – Compose your text widget code.

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 for your clickable image.

Your code can be written a simple text editor and should look something like this …

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

  • 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 which sections of the above code you will need to replace with your actual contact details …

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

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:

Next, go back into your Widgets area …

Activate or deactivate widgets using drag-and-drop

(Widgets Screen)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar where you would like the button to display.

In the Available Widgets area, select the Text widget …

WordPress text widget

(WordPress text widget)

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

Drag and drop your WordPress text widget

(Dragging and dropping 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 the text widget content area and click the save button …

WordPress text widget

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

Text widget

Important

Note: Make sure to check your contact page and image links before pasting scripts into your Text Widget, or the clickable button will not work.

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

If adding text without formatting tags like paragraph breaks, you may want to tick the Automatically add paragraphs box to wrap each block of text in paragraphs (note: not required if you type in HTML content 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 box unchecked

(Automatically add paragraphs box not checked)

Here is some text added to a Text widget with Automatically add paragraphs box selected …

Automatically add paragraphs box checked

(Automatically add paragraphs box checked)

***

Step 6 – Refresh the browser.

After adding the text widget and code, go to the front end of your site and refresh the web browser. If you have entered all of the links correctly, then the clickable support button will display in your sidebar menu …

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

(Clickable support button widget on blog sidebar)

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

Step 7 – Test your button.

The last step is to make sure that the clickable button works. Test this by clicking the support button. If you are taken to your support page, then the text widget has been set up correctly …

Test the text widget

(Test the text widget)

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:

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

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

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

When inserting images into your sidebar navigation area, make sure that the width of the image doesn’t exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. As we’ve previously mentioned, some themes can display different column widths 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 have to either adjust the size of your images, or the width of your sidebar column to make the images display correctly on your sidebar section.

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

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

Extra Tips:

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

Adding WordPress Widgets To Your Sidebar

***

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

To continue, click here:

***

"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