How To Use And Configure WordPress Widgets – Part 2

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

Using WordPress WidgetsIn Part One of this tutorial, we explained the basics of using widgets in WordPress.

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

How To Configure Commonly-Used WordPress Sidebar Widgets

By default, your site comes with a number of preinstalled active widgets, such as widgets for displaying external links, recent posts, news items, add a search box, etc.

By default, your site comes with a number of built-in widgets

(By default, your site comes with a number of pre-installed widgets)

Setting Up Widgets On The Blog Sidebar: Step-By-Step Tutorial

In this step-by-step tutorial series, we are going to add, configure and reorder various commonly-used WordPress widgets to display in your site’s sidebar section, including:

  • Add a Support image linking to the support page.
  • Add a Categories section with a drop down menu.
  • Add a Recent Posts section.
  • Add a list of Pages.
  • Display Links on the sidebar navigation section.
  • Displaying the latest news with an RSS Feed section.
  • Adding a list of clickable tags through a Tag Cloud.
  • Configure how your Archived Posts display on your sidebar navigation area.

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

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets section in your web browser …

Widgets Section

(Widgets Panel)

Let’s get started …

Add A Text Widget To Your Blog Sidebar

Text widgets are incredibly 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 comments, maps and directions, scripts and more to your site … just by typing in text or adding HTML into the content area. You can also add an optional title in the Title field. Remember to save your settings …

Text widgets are extremely versatile

(Text widgets are really useful!)

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

For this example, let’s set up a contact button on your sidebar 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 “help button” graphic image that visitors can click on …

Using A Text Widget To Add A Clickable Help Button To Your Sidebar Navigation Section

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

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

Step 1 – Upload your image.

Upload the button image to a folder on your server and note the URL pointing to your server’s image location.

For example …

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

This information will be required in Step 3.

In order for visitors to go to your contact page when the help button gets 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 your button image to this URL in Step 3

Step 2 – Add a support page.

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

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

Step 3 – Compose the HTML 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 button image to the contact page/helpdesk.

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

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

  • 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 will need to replace with the actual contact details …

Use A Text Widget To Add A Clickable Support 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:

Go back into 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 where you want the button to display.

In the Available Widgets area, find the Text widget …

Text widget

(Text widget)

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

Drag-and-drop your WordPress text widget

(Drag and drop your Text widget)

Step 5 – Configure the widget settings.

Click on the 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 …

Text widget

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

WordPress text widget

Useful Information

Note: Remember 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’re typing in HTML code like we’re doing in this tutorial).

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

Automatically add paragraphs box not checked

(Automatically add paragraphs option unchecked)

Here is some text with Automatically add paragraphs box checked …

Automatically add paragraphs box checked

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh the web browser.

After adding the widget and HTML code, go to the front-end of your site and refresh the browser. If all links have been entered correctly, then your clickable support button should display at the top of the sidebar menu …

Using A Text Widget To Add A Help Button To The Sidebar Menu

(Clickable button widget on sidebar)

The above screenshot shows a clickable button added to a newly-installed WordPress site.

Step 7 – Test the button.

The last step is to ensure that the clickable button works. Test this by clicking on the support button. You should be taken directly to the support page …

Test your clickable button

(Test your text widget to make sure you’ve set everything up correctly)

Tip

Useful Tips:

If you want your support page to display in a new browser window when visitors click on the help (so they don’t leave the page they’re on), then change the button code from this:

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

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

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

When choosing images for your sidebar area, make sure that the width of your image doesn’t 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 layout. Some sidebars may be wider or narrower. If your theme’s sidebar is narrower than the width of the graphic images, then you may have to either adjust the size of your images, or the width of your sidebar column to make images display correctly on your sidebar.

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

(Adjust column width or reduce image size)

Extra Tips:

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

How To Add And Configure WordPress Widgets In The Sidebar

***

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

Click on this link to read the rest of this tutorial:

***

"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum