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

In this section you will configure various WordPress sidebar widgets.

How To Configure Widgets

In a default WordPress installation, your site comes with a number of built-in widgets that can be used out of the box with little to no configuration needed, such as widgets that let you display links to your pages, filter posts by categories, newsfeeds, add search features, etc.

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

(In a default WordPress installation, your site comes with several active widgets)

How To Add Frequently-Used WordPress Sidebar Widgets To WordPress: Tutorial

In this tutorial, we will add, configure and reorder various WordPress widgets to display in your site’s sidebar, including:

  • Add a clickable Support Contact image linking to your contact page.
  • Add a Categories section with a drop down menu.
  • Add a Recent Posts section.
  • Add a list of your site’s main Pages.
  • Display useful Links on the sidebar section.
  • Displaying news items using an RSS Feed section.
  • Adding a Tag Cloud.
  • Configure how your Archived Posts display on the sidebar menu.

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

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This opens the Widgets area in your browser window …

Widgets Panel

(Widgets Screen)

Let’s start by configuring WordPress text widgets …

Add A Text Widget

Text widgets are incredibly useful …

WordPress Text widget

(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 instructions, images, news and updates and more to your site … just by typing in text or inserting HTML into the widget content area. You can also give the widget a title. Remember to save your settings …

Text widgets are really useful

(A text widget is really versatile!)

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

For this example, we’ll set up a clickable support button on your sidebar area 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 will want your visitors to click on …

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

We’ll set up the clickable Help 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 Your Sidebar Section

Step 1 – Upload your image.

To display the clickable image on your site, first you must upload the image to your server and note down the address of your server’s image location.

E.g. …

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

You will use this information in Step 3.

In order for visitors to be taken to the contact page when they click on the support button, you will need to either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link your button image to this URL in Step 3

Step 2 – Create your contact page.

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

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

Step 3 – Compose your text widget code.

If you’re not a technical-minded person, don’t worry … this sounds a lot more technical than it is. In simple terms, we just need to create the instructions linking the graphic image to your contact page/helpdesk.

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

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

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

The screenshot below shows the sections of the above code that you need to replace with the actual contact details …

Use A Text Widget To Add A Clickable Support Button To The Sidebar Navigation Area

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

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

Go back into your Widgets panel …

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 button should display.

In the Available Widgets area, find the Text widget …

Text widget

(Text widget)

Drag your 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 your widget.

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

Text widget

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

WordPress text widget

Useful Information

Note: Remember to test all URLs before pasting scripts into the Text Widget, or the clickable button will not work.

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

If adding text without formatting tags, 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 type in formatted content like we’re using in the example for this tutorial).

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

Automatically add paragraphs option not selected

(Automatically add paragraphs option unchecked)

Here is some text with Automatically add paragraphs option ticked …

Automatically add paragraphs box ticked

(Automatically add paragraphs option selected)

***

Step 6 – Refresh your browser.

Once you have added the text 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 your sidebar menu …

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

(Clickable button widget on blog sidebar)

The screenshot above shows the contact button in the sidebar menu of a brand new WordPress site.

Step 7 – Test the widget.

The final step is to ensure that the clickable button works. Test this by clicking the button. You should be taken directly to the support page …

Test the text widget to ensure you've set everything up correctly

(Test the clickable button to ensure it works)

Practical Tip

Tips:

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

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

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

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

When inserting images into your sidebar section, 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 we’ve previously mentioned, some themes can display different column widths 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 have to either adjust the size of your images, or the column width to make images display correctly on your sidebar.

Adjust column width or reduce image size

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

Additional Tips:

  • If you don’t want your button image to be centered inside the sidebar, delete the <center> and </center> tags from the beginning and end of the HTML code. The image will then be aligned to its default settings (normally left-aligned).
  • Link the help button to any URL you want (e.g. to an external link, contact form, FAQ page, etc.) and change this anytime by editing the code inside your text widget.

How To Add And Configure Widgets In The WordPress Blog Sidebar Menu

***

This is the end of part two of this series of tutorials about using Widgets.

Click on this link 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