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 step-by-step tutorial, we explained the basics of using widgets in WordPress.

In this section we are going to show you how to configure various WordPress sidebar widgets.

How To Configure Widgets

By default, your site comes with several preinstalled widgets, such as widgets that let you display links to your pages, filter posts by categories, news items, add a search box, etc.

By default, your site comes with a number of preinstalled widgets

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

Adding Sidebar Widgets In WordPress: Step-By-Step Tutorial

In this tutorial, you are going to add, configure and reorder s number of WordPress widgets, including:

  • Add a clickable Help graphic linking to the support page.
  • Add a Categories section with a drop down menu.
  • Adding a Recent Posts section.
  • Add a list of the site’s Pages.
  • Display useful Links on the sidebar.
  • Add an RSS Feed section.
  • Adding a Tag Cloud section.
  • Add and configure an Archives section to the sidebar navigation area.

The Widgets section is located in your WP administration area and can be accessed from the administration menu by selecting Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets area in your browser window …

Widgets Screen

(Widgets Section)

Let’s configure WordPress text widgets …

Text Widgets

Text widgets are quite useful …

Text widget

(WordPress 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 can be used to add notices, image links, reviews 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 …

A text widget is really useful

(A text widget is really versatile!)

Example: Add A Clickable Contact Button To The Sidebar Menu Using A Text Widget

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

Use A Text Widget To Add A Clickable Help Button To Your Sidebar Menu

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

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

Step 1 – Upload your image.

To display the image on your site, the image must be uploaded to your server. Upload the image to the images folder in your server and note the URL pointing to your image location.

For example …

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

This information will be required in Step 3.

In order for visitors to be taken to the contact page when the help button gets clicked, either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will then link the button image to this URL in Step 3

Step 2 – Create the support page.

Create a contact page and note its URL …

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

Step 3 – Create 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. In simple terms, you just need to create the instructions for your clickable image.

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

Add A Contact Button To The Sidebar 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 the sections of the above sample code that you will need to replace with the actual contact details …

Using A Text Widget To Add A 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 figuring out basic HTML code, see this tutorial:

Now, go back to your Widgets panel …

Activate or deactivate widgets using drag & 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, find a Text widget …

Text widget

(WordPress text widget)

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

Dragging and dropping your WordPress text widget

(Dragging and dropping your Text widget)

Step 5 – Configure your text widget settings.

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 your text widget content area and click save …

WordPress text widget

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

WordPress text widget

Info

Note: Remember to test all links before pasting scripts into the Text Widget, or your 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: this is not necessary if you’re pasting in code like we’re using in the example for this tutorial).

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

Automatically add paragraphs box not selected

(Automatically add paragraphs option not selected)

Here is some text with Automatically add paragraphs option checked …

Automatically add paragraphs box ticked

(Automatically add paragraphs option ticked)

***

Step 6 – Refresh your browser.

After adding the widget and HTML code, visit the front end of your site and refresh the web browser. If you have entered all of the links correctly, then your clickable support button should display in the site’s sidebar menu …

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

(Clickable support button widget on sidebar)

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

Step 7 – Test the widget.

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

Test the text widget

(Test your clickable button to ensure it works)

Tip

Text Widgets – Useful Tips:

If you want your contact page to open in a new 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 The Sidebar Menu

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

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

When choosing images for your sidebar navigation menu, 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 explained, some themes may display elements differently depending on their templates and their layout. Some sidebars are wide and some are narrow. If the sidebar of your theme is narrower than the width of your 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 theme.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

Additional Tips:

  • If you don’t want the button image to be centered 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 support button to any URL you like (e.g. to an external site, helpdesk, forum, etc.) and change this anytime by replacing the code inside your widget.

Using WordPress Widgets

***

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

Click here to continue:

***

"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya