Blog

How To Use And Configure WordPress Widgets – Part 2

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

Adding And Configuring WordPress Widgets In Your WebsiteIn Part One of this step-by-step tutorial series, we cover the basics of using widgets in WordPress.

In this section you are going to configure various frequently-used WordPress sidebar widgets.

Configuring Widgets

By default, your site comes with several built-in widgets, such as widgets for displaying external links, filter posts by categories, text or HTML banners, add content search features, etc.

By default, your site comes with a number of built-in widgets

(By default, your site comes with several active widgets)

How To Configure Commonly-Used WordPress Widgets On Your Blog Sidebar: Step-By-Step Tutorial

In this tutorial, you are going to add, configure and reorder a number of commonly-used widgets, including:

  • Adding a clickable Contact Us button linking visitors to the contact details page.
  • Adding a Categories section.
  • Adding a Recent Posts section.
  • Add a list of your site’s Pages.
  • Display Links on the sidebar.
  • Displaying news items with an RSS Feed section.
  • Adding a Tag Cloud.
  • Configure how your Archived Posts display on your sidebar section.

To access the Widgets section go to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This opens the Widgets section in your browser window …

Widgets Screen

(Widgets Panel)

Let’s get started …

Add A Text Widget To The Blog Sidebar Section

Text widgets are quite 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 the sidebar or other widget sections, such as email and contact information, images, scripts and more to your site … just by typing in text or adding HTML into the content area. You can also give the widget a title. Remember to save your settings …

A text widget is really versatile

(A text widget is really useful!)

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

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

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

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

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

Step 1 – Upload your image.

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

For example …

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

This information will be required in Step 3.

For someone to go to the contact page when they click on the support 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 the button image to this URL in Step 3

Step 2 – Add the destination page.

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

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

Step 3 – Create your text widget code.

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 written a simple text file and should look something like this …

Using A Text Widget To Add A Clickable Support Button To Your 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 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 your actual web addresses …

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

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:

Now, go back into your Widgets screen …

Activate or deactivate widgets using drag and drop

(Widgets Area)

Step 4 – Add a Text widget.

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

In the Available Widgets area, select the Text widget …

Text widget

(WordPress text widget)

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

Dragging and dropping your Text widget

(Drag and drop your Text widget)

Step 5 – Configure the widget.

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

Text widget

Add a heading to your widget if you want (e.g. “Need Help?”, “Support”, etc.) and paste the code with the correct destination URLs into the text area, then click the save button …

WordPress text widget

Info

Note: Remember to test all URLs before pasting scripts into the Text Widget, or the clickable button won’t 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 paragraphs (note: this is not necessary if you’re pasting in formatted HTML 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 unchecked

(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 checked

(Automatically add paragraphs option checked)

***

Step 6 – Refresh the browser.

After adding your widget and HTML content, go to your site and refresh your browser. If you have entered all of the links correctly, then the clickable support button will display in your site’s sidebar menu …

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

(Clickable button widget on blog sidebar)

The above screenshot shows the support contact button added to a newly-installed WordPress site.

Step 7 – Test the button.

The final step is to ensure that your clickable button works. Test this by clicking the button. If you are taken to the support page, then your text widget has been set up correctly …

Test your text widget to make sure it works

(Test your text widget)

Useful Tip

Tips:

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

Use A Text Widget To Add A Help Button To Your Sidebar Section

To this (i.e. insert the section that says: target=”_blank” in the code):

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

When choosing images to add to your sidebar navigation section, make sure that the width of your image does not exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. Note that some themes can display elements differently depending on their templates and their layout. Some sidebars may be too wide or too narrow. If the sidebar of your theme is narrower than the width of the graphic images, then you may have to either adjust the image size, or the column width to make graphics display correctly on your sidebar area.

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

(Adjust column width or reduce image size)

Extra Tips:

  • If you don’t want to center your image in your sidebar, delete the <center> and </center> tags from the beginning and end of the code. The image will then align to the left.
  • You can link your support button to any destination you like (e.g. to an external site, contact form, forum, etc.) and change this anytime by editing the links in your text widget.

How To Add WordPress Widgets To The Website

***

This is the end of part two of this tutorial.

To continue reading, click here:

***

"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group