How To Use And Configure WordPress Widgets – Part 2

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

Using Widgets In WordPressIn Part 1 of this step-by-step tutorial, we explained the basics of using widgets in WordPress.

In this tutorial you are going to configure a number of WordPress widgets.

How To Configure Frequently-Used WordPress Blog Sidebar Widgets

In a default WordPress installation, your site comes with several preinstalled widgets, such as widgets for displaying external links, filter posts by categories, RSS feed content, adding site search features, etc.

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

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

How To Add Widgets To The Sidebar Navigation Area: Tutorial

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

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

The Widgets area can be accessed inside the WordPress admin by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings you to the Widgets screen into your web browser …

Widgets Screen

(Widgets Panel)

Let’s configure text widgets …

Adding Text Widgets To Your Blog Sidebar

Text widgets are incredibly versatile …

WordPress 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 can be used to add article snippets, videos, tips and more to your site … simply type in text or paste HTML into the widget content area. You can also give the widget a title. Remember to save your settings when done …

A text widget is extremely versatile

(A text widget is extremely versatile!)

Example: Use A Text Widget To Add A Clickable Contact Button To Your Sidebar Section

For this example, let’s set up a clickable support button on the sidebar 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 you can use on your own site …

Using A Text Widget To Add A Clickable Support Button To Your Sidebar Area

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

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

Step 1 – Upload your image.

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

For example …

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

You will use this information in Step 3.

In order for visitors to go to your contact page when they click on the help button, 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 – Add a support page.

Create a contact page and note down its URL …

Use A Text Widget To Add A Help Button To The Sidebar Navigation Menu

Step 3 – Compose 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 linking the graphic image to your contact page/helpdesk.

Your instructions can be typed into a plain text file and should look something like this …

Add A Clickable Help Button To The Sidebar Menu 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 which sections of the above sample code you will need to replace with the actual contact page and image URLs …

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

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

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

Next, go back to your Widgets area …

Activate or deactivate widgets using drag & drop

(Widgets Screen)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar where you would like the button to display.

In the Available Widgets area, find 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 settings. Paste the code with the links to your contact page and graphic button into your text widget content area and click the save button …

Text widget

Add a title to the 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

Important

Note: Remember to check all 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’re pasting in HTML code like we’re doing in this tutorial).

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

Automatically add paragraphs box not selected

(Automatically add paragraphs option not checked)

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

Automatically add paragraphs option checked

(Automatically add paragraphs option checked)

***

Step 6 – Refresh the browser.

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

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

(Clickable button widget on sidebar)

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

Step 7 – Test your widget.

The last step is to ensure that the links work. Test this by clicking the button. You should be taken directly to the contact page …

Test the clickable button

(Test your text widget to make sure you’ve set up everything correctly)

Useful Tip

Text Widgets – Useful Tips:

If you want the support page to display in a new browser window when visitors click on the support (so they don’t leave the page they’re on), then change the button code from this:

Use A Text Widget To Add A Help Button To The Sidebar Navigation Menu

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

Use A Text Widget To Add A Clickable Help Button To The Sidebar Menu - open in new window

When adding images to 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 can display different column widths depending on their templates and their layout. Some sidebars may be too wide or too narrow. If your theme’s sidebar width is narrower than the width of your graphic images, then you may need to either adjust the image size, or the column width to make the images display correctly on your sidebar area.

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

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

Extra Tips:

  • If you don’t want to center the button in your 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 the support button to any destination you want (e.g. to an external site, helpdesk, support forum, etc.) and change this anytime by editing the content in the widget.

Using Widgets In WordPress

***

This is the end of section two of this tutorial on using WordPress widgets.

To view Part 3, click here:

***

"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie