How To Use And Configure WordPress Widgets – Part 2

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

Adding WordPress Widgets To The WordPress Blog SidebarIn Part 1 of this tutorial series, we cover the basics of how to use WordPress widgets.

In this section you are going to learn how to configure various commonly-used widgets in WordPress.

Configuring Commonly-Used WordPress Sidebar Widgets

By default, your site comes with several built-in active widgets, such as widgets for displaying external links, recent posts, RSS feed content, add search features, etc.

By default, your site comes with several preinstalled widgets

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

How To Add Sidebar Widgets To WordPress: Step-By-Step Tutorial

In this step-by-step tutorial, we are going to add, configure and reorder various WordPress widgets, including:

  • Adding a Support Contact button linking visitors to the help page.
  • Adding a Categories section with a drop down menu.
  • Adding a Recent Posts section.
  • Add a list of the site’s main Pages.
  • Display a list of useful Links on your sidebar area.
  • Adding an RSS Feed section.
  • Adding a Tag Cloud.
  • Configure how Archived Posts display on your sidebar navigation menu.

The Widgets area can be accessed inside the admin by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets section in your web browser …

Widgets Panel

(Widgets Screen)

Let’s configure text widgets …

Add A Text Widget To Your Blog Sidebar

Text widgets are versatile …

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)

A text widget lets you insert just about anything you want into your sidebar or other widget sections, such as events, ads, messages and more to your site … simply 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 when done …

A text widget is really versatile

(Text widgets are very useful!)

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

For this example, let’s set up a clickable support 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 graphic image that visitors can click on …

Add A Support Button To Your Sidebar Area Using A Text Widget

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

Using A Text Widget To Add A Help Button To The Sidebar Navigation Area

Step 1 – Upload your image.

Upload the graphic image to your server’s images folder and note down the path to your server’s image location.

For example …

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

You will use this information in Step 3.

For visitors to go to your contact page when they click on the graphic button, 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 your destination page.

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

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

Step 3 – Compose your text widget code.

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

Your code can be typed in a simple text editor and will look something like this …

Use A Text Widget To Add A Clickable Support Button To The Sidebar Navigation Section

  • 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 your actual contact page and image URLs …

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

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

Next, go back into 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 where you would like your clickable button to display.

In the Available Widgets area, select the Text widget …

Text widget

(Text widget)

Drag your Text widget to your Active Widgets section and release it 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 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 …

WordPress text widget

Add a title 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 …

Text widget

Useful Information

Note: Make sure to check your contact page and image URLs before pasting scripts into the Text Widget, or the 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 an HTML paragraph code (note: this is not necessary if you’re typing in formatted HTML content like we’re doing in this tutorial).

Here is some text with Automatically add paragraphs option not ticked …

Automatically add paragraphs option not checked

(Automatically add paragraphs box unchecked)

Here is some text with Automatically add paragraphs box ticked …

Automatically add paragraphs option checked

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh the web browser.

After adding your text widget and formatted content, visit the front-end of your site and refresh the web browser. If all links have been entered correctly, then the clickable support button should display in the sidebar menu …

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

(Clickable button widget on sidebar)

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

Step 7 – Test your widget.

The final step is to make sure that the destination link works. Test this by clicking the graphic button. You should be taken to the contact page …

Test your text widget

(Test your clickable button to make sure it works)

Useful Tip

Text Widgets – Useful Tips:

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

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

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

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

When choosing images to add to your sidebar navigation area, make sure that the width of your image does not exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. Note that some themes may display different column widths depending on their templates and layout. Some sidebars may be too wide or too narrow. If your theme’s sidebar width is narrower than the width of your graphic 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.

Adjust column width or reduce image size

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

Additional Tips:

  • If you don’t want your button to be centered in the sidebar, delete the <center> and </center> tags from the beginning and end of the code. The image will then be left-aligned.
  • Link your support button to any URL you want (e.g. to an external site, contact form, FAQ page, etc.) and change this anytime by editing the links in the widget.

Using Widgets In WordPress

***

This is the end of part two of this series of tutorials about how to use WordPress widgets.

Click on this link to keep reading:

***

"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