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 WordPress Widgets In Your Sidebar Navigation SectionIn Part One of this tutorial, we explained the basics of how to use widgets in WordPress.

In this tutorial you will configure various frequently-used widgets in WordPress.

How To Configure Sidebar Widgets

By default, your site comes with several built-in widgets, such as widgets that let you display links to your pages, filter posts by categories, newsfeeds, filter content by publish dates, etc.

In a default WordPress installation, your site comes with several preinstalled widgets

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

Configuring Commonly-Used WordPress Sidebar Widgets: Tutorial

In this tutorial, you will add, configure and reorder a number of frequently-used WordPress widgets, including:

  • Add a clickable Support Contact graphic button linking to your help page.
  • Add a Categories section.
  • Adding a Recent Posts section to display your latest posts.
  • Adding a list of your site’s Pages.
  • Display Links on your sidebar menu.
  • Displaying news items using an RSS Feed section.
  • Adding a list of clickable tags with a Tag Cloud.
  • Adding and configuring an Archives section to the sidebar area.

The Widgets screen is located in the WP admin area and can easily be accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets section in your web browser …

Widgets Area

(Widgets Panel)

Let’s start configuring some widgets …

Adding Text Widgets To The Sidebar

Text widgets are incredibly useful …

Text widget

(Text widget)

Useful 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 let you insert just about anything you want into your sidebar section or other widget sections, such as events, image links, special promotions and more to your site … simply type in text or insert HTML into the content area. You can also give the widget a title. Remember to save your settings when done …

Text widgets are very useful

(A text widget is really useful!)

Example: Add A Help Button To The Sidebar Section Using A Text Widget

For this example, we’ll set up a support button on the sidebar navigation menu that takes 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 Clickable Contact Button To Your Sidebar Navigation Menu

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

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

Step 1 – Upload your image.

To display the clickable button image on your site, the image must be uploaded to your server. Upload the button graphic to the images folder in your server and write down the URL pointing to your image location.

For example …

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

This information will be used in Step 3.

In order for someone to go to your contact page when they click on the help button, you must 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 – Create a contact page.

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

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

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

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

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

  • 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 with the URL of your image location.

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

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

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

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

Next, go back to your Widgets area …

Activate or deactivate widgets using drag-and-drop

(Widgets Panel)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar in the location where your support button should display.

In the Available Widgets area, select a Text widget …

WordPress text widget

(WordPress text widget)

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

Drag-and-drop your Text widget

(Drag and drop your WordPress text widget)

Step 5 – Configure the widget settings.

Click on the widget title bar to configure the widget 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 …

Text widget

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

WordPress text widget

Useful Information

Note: Make sure to test your contact page and image links before pasting scripts into the Text Widget, or the clickable button will not work.

*** If using WordPress version pre-4.8 ***

If you’re 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 paste in HTML content like we’re doing in this tutorial).

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

Automatically add paragraphs option not checked

(Automatically add paragraphs option not selected)

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

Automatically add paragraphs box ticked

(Automatically add paragraphs box checked)

***

Step 6 – Refresh your web browser.

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

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

(Clickable support button widget on blog sidebar)

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

Step 7 – Test your widget.

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

Test the text widget

(Test your clickable button to ensure it works)

Practical Tip

Tips:

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

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

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

Use A Text Widget To Add A Clickable Contact Button To The Sidebar Navigation Area - open in new window

When choosing images to add to your sidebar navigation menu, make sure that the width of your image doesn’t exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. As mentioned earlier, some themes can display elements differently depending on their templates and layout. Some sidebars may be wider or narrower. If the sidebar of your theme is narrower than the width of the button images, then you may need to either adjust the size of your images, or the column width to make graphics display correctly on your theme.

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 to center your button in your 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 link, contact form, FAQ page, etc.) and change this anytime by replacing the code inside the widget.

Adding WordPress Widgets To Your Site

***

This is the end of part 2 of this tutorial on using Widgets.

To view the rest of this tutorial series, click this link:

***

"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