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 Your WordPress SidebarIn Part 1 of this step-by-step tutorial series, we cover the basics of using widgets in WordPress.

In this section you will learn how to configure a number of commonly-used widgets in WordPress.

Configuring Frequently-Used WordPress Sidebar Widgets

By default, 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, news items, adding search features, etc.

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

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

Configuring Frequently-Used Widgets On The Blog Sidebar Section: Tutorial

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

  • Adding a clickable Help image linking visitors to the contact details page.
  • Adding a Categories section with a drop down menu.
  • Add a Recent Posts section to display the latest posts.
  • Adding a list of your site’s main Pages.
  • Display useful Links on your sidebar menu.
  • Adding an RSS Feed section.
  • Adding tags to the sidebar using a Tag Cloud section.
  • Configure how Archived Posts display on the sidebar.

The Widgets panel is located inside your WordPress admin area and can be accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This opens the Widgets area into your browser window …

Widgets Area

(Widgets Panel)

Let’s get started …

Text Widgets

Text widgets are incredibly versatile …

Text widget

(WordPress 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 can be used to add instructions, social media buttons, tips 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 …

A text widget is really useful

(Text widgets are very useful!)

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

For this example, let’s set up a help button on the sidebar 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, you will need to create or source a graphic image that your visitors can click on …

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

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

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

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 image to your server and write down the address of your image location.

E.g. …

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

This information will be used in Step 3.

In order for visitors to be taken 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 then link your button graphic to this URL in Step 3

Step 2 – Add your contact page.

Create a contact page and note its URL …

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

Step 3 – Compose the HTML code for your text widget.

Don’t worry … this sounds a lot more technical than it is. In simple terms, we just need to create the instructions for your clickable button.

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

Add A Help Button To Your Sidebar Navigation Area 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 image below shows which sections of the above sample code you will need to replace with the actual web addresses …

Use A Text Widget To Add A Clickable Help Button To The Sidebar Navigation Area

Replace the above URLs and then copy the above code to your clipboard when finished.

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

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 in the location where the support button should display.

In the Available Widgets area, find the Text widget …

Text widget

(Text widget)

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

Dragging and dropping your Text widget

(Drag and drop your WordPress text widget)

Step 5 – Configure the widget.

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

WordPress text widget

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

Text widget

Important

Note: Remember to check all links before pasting scripts into your Text Widget, or the button will not 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 HTML code like we’re doing in this tutorial).

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

Automatically add paragraphs option not ticked

(Automatically add paragraphs box not selected)

Here is some text with Automatically add paragraphs box ticked …

Automatically add paragraphs option selected

(Automatically add paragraphs box selected)

***

Step 6 – Refresh your web browser.

Once you have added your widget and code content, visit your site and refresh your browser. If you have entered all of the links correctly, then the support button should display in your site’s sidebar menu …

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

(Clickable support button widget on blog sidebar)

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

Step 7 – Test your widget.

The last step is to make sure that the destination URL works. Test the button to make sure that visitors will go to the contact page when they click on the graphic image. If you are taken directly to the support page, then the text widget has been set up correctly …

Test the text widget

(Test your text widget)

Tip

Text Widgets – Useful Tips:

If you would like your contact page to display in a new window when visitors click on the support (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 Support Button To Your Sidebar Navigation Area

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

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

When inserting images into your sidebar 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. Note that some themes can display different column widths depending on their templates and 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 image size, or the width of your sidebar column to make graphics display correctly on your sidebar section.

Adjust column width or reduce image size

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

Additional Tips:

  • If you don’t want the image to be centered inside your 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).
  • Link the help button to any URL you want (e.g. to an external link, contact form, support forum, etc.) and change this anytime by replacing the links in your widget.

Adding And Configuring WordPress Widgets In Your Sidebar

***

This is the end of part two of this tutorial on how to use WordPress widgets.

To view Part 3, click this link:

***

"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