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 BlogIn Part One of this tutorial series, we explained the basics of how to use widgets in WordPress.

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

Sidebar Widget Configuration

By default, your site comes with a number of built-in active widgets, such as widgets that let you display external links, filter posts by categories, newsfeeds, filter content by publish dates, etc.

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

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

Adding Widgets To Your Blog Sidebar Navigation Section: Tutorial

In this step-by-step tutorial, you will learn how to add, configure and reorder s number of WordPress widgets, including:

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

The Widgets area is located inside the WP admin area and can be easily accessed from the WordPress dashboard menu by clicking on Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets area in your web browser …

Widgets Screen

(Widgets Screen)

Let’s get started …

Add A Text Widget

Text widgets are incredibly versatile …

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 email and contact information, image links, reviews and more to your site … simply by typing in text or pasting HTML into the widget content area. You can also give the widget a title. Remember to save your settings …

Text widgets are versatile

(Text widgets are very useful!)

Example: Use A Text Widget To Add A Clickable Contact Button To The Sidebar Navigation Area

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

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

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

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

Step 1 – Upload your image.

To display the image on your site, you must first upload the button image to your server’s images folder and note the URL pointing to your server’s image location.

For example …

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

You will use this information in Step 3.

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

Step 2 – Create the support page.

Create a contact page and note the page URL …

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

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, you just need to create the instructions linking the button image to the destination URL.

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

Use A Text Widget To Add A Clickable Help Button To Your Sidebar 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 above with the URL of your image location.

The screenshot below shows the sections of the above code that you will need to replace with the actual contact page and image URLs …

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

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

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

Next, go back to your Widgets section …

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 a Text widget …

Text widget

(WordPress text widget)

Drag the 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 text widget settings.

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

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 destination links into the large text box, then click the save button …

Text widget

Info

Note: Remember to check all links before pasting scripts into the Text Widget, or your button won’t 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 type in code like we’re using in the example for this tutorial).

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

Automatically add paragraphs box not selected

(Automatically add paragraphs box not checked)

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

Automatically add paragraphs box selected

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh your browser.

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

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

(Clickable support button widget on blog sidebar)

The screenshot above shows ’click for help’ button added to a newly-installed WordPress site.

Step 7 – Test the widget.

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

Test your clickable button to ensure it works

(Test the clickable button to ensure you’ve set everything up correctly)

Tip

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 code from this:

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

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

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

When choosing images for your sidebar navigation 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. As we’ve previously mentioned, 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 image, then you may have to either adjust the size of your images, or the column width to make elements display correctly on your sidebar.

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

(Adjust column width or reduce image size)

Extra Tips:

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

How To Use WordPress Widgets

***

This is the end of part 2 of this series of tutorials.

To continue reading, click here:

***

"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum