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 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 begin configuring various sidebar widgets in WordPress.

Configuring Sidebar Widgets

By default, your site comes with several built-in widgets that can be used out of the box with little to no configuration needed, such as widgets that let you display links to your pages, recent posts, newsfeeds, add tag clouds, etc.

In a default WordPress installation, your site comes with several pre-installed widgets

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

How To Add And Configure Frequently-Used WordPress Widgets On Your Sidebar: Step-By-Step Tutorial

In this step-by-step tutorial, you will learn how to add, configure and reorder s number of WordPress widgets to display in the site’s sidebar, including:

  • Adding a clickable Support Contact graphic button linking to your contact page.
  • Adding a Categories section.
  • Add a Recent Posts section.
  • Adding a list of your site’s main Pages.
  • Display useful Links on the sidebar navigation section.
  • Display news items with an RSS Feed section.
  • Adding tag links through a Tag Cloud section.
  • Configure how Archived Posts display on your sidebar.

The Widgets section is located in your WP administration area and can easily be accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets section in your browser …

Widgets Panel

(Widgets Section)

Let’s get started …

Adding Text Widgets To The Blog Sidebar

Text widgets are quite useful …

WordPress Text widget

(WordPress Text widget)

Useful Information

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 lists of favorite items, images, special promotions and more to your site … just type in text or paste 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 extremely versatile

(A text widget is really useful!)

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

For this example, let’s set up a support button on the sidebar navigation area that takes 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 your visitors can click on …

Add A Contact Button To Your Sidebar Section Using A Text Widget

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

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

Step 1 – Upload your image.

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

E.g. …

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 graphic button is 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 your support page.

Create a contact page and note its URL …

Add A Clickable Contact Button To The Sidebar Navigation Area 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, we just need to create the instructions for your clickable button.

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

Use A Text Widget To Add A Clickable Support Button To The Sidebar Menu

  • 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 above 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 …

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

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

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

Now, go back to 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 your clickable button should display.

In the Available Widgets area, select the Text widget …

Text widget

(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

(Drag-and-drop your WordPress text widget)

Step 5 – Configure your widget settings.

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

Text widget

Add a title section to the widget if you want (e.g. “Need Help?”, “Get Support”, etc.) and paste the code with the correct URLs into the Content box, then click Save when done …

Text widget

Info

Note: Remember to check all URLs before pasting scripts into the Text Widget, or the button will not 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 paragraphs (note: not required if you’re typing in code like we’re doing in this tutorial).

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

Automatically add paragraphs box not selected

(Automatically add paragraphs option unchecked)

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

Automatically add paragraphs option selected

(Automatically add paragraphs option selected)

***

Step 6 – Refresh your web browser.

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

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

(Clickable support button widget on blog sidebar)

The above screenshot shows ’click for help’ button in the sidebar navigation area of a brand new WordPress site.

Step 7 – Test your button.

The last step is to make sure that the clickable button works. Test the button to make sure that visitors will go to your help page when clicking the graphic image. If you are taken directly to the contact page, then your text widget has been set up correctly …

Test your text widget to ensure it works

(Test your text widget)

Tip

Text Widgets – Useful Tips:

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

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

To this (i.e. include the part containing target=”_blank” in the html code):

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

When inserting images into your sidebar area, 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 may display elements differently depending on their templates and their layout. Some sidebars may be wider or narrower. If your theme’s sidebar width is narrower than the width of your button images, then you may need to either adjust the size of your images, or the width of your sidebar column to make images display correctly on your sidebar area.

Adjust column width or reduce image size

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

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 HTML code. The image will then align to the left.
  • Link your help button to any URL you like (e.g. to an external site, helpdesk, support forum, etc.) and change this anytime by editing the code in your text widget.

How To Add WordPress Widgets To The Sidebar Navigation Menu

***

This is the end of section 2 of this series of tutorials on how to use WordPress widgets.

Click here to access Part 3:

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org