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 WordPress Widgets To The Sidebar MenuIn Part One of this tutorial series, we explained the basics of how to use WordPress widgets.

In this tutorial you will learn how to configure a number of WordPress sidebar widgets.

How To Configure Widgets

By default, your site comes with several preinstalled widgets that can be used out of the box with minimal to no configuration required, such as widgets that let you display links to your pages, recent posts, text or HTML banners, add content search features, etc.

In a default WordPress installation, your site comes with a number of pre-installed widgets

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

How To Add Widgets To Your WordPress Sidebar Section: Step-By-Step Tutorial

In this tutorial series, we will add, configure and reorder various frequently-used WordPress widgets, including:

  • Add a Help image linking visitors to the support page.
  • Adding a Categories section.
  • Adding 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 with an RSS Feed section.
  • Add a Tag Cloud section.
  • Adding and configuring an Archives section to your sidebar.

The Widgets screen is located in your WordPress admin area and can be easily accessed from the dashboard menu by choosing Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets screen in your web browser …

Widgets Area

(Widgets Area)

Let’s start to configure some widgets …

Adding Text Widgets To The Blog Sidebar

Text widgets are incredibly useful …

WordPress Text widget

(WordPress Text widget)

Useful Information

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 notices, images, scripts and more to your site … just by typing in text or adding HTML into the content area. You can also add an optional title in the Title field. Remember to save your settings when done …

A text widget is really versatile

(Text widgets are really useful!)

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

For this example, we’ll set up a clickable support button on your sidebar that will take 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 graphic image that your visitors can click on …

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

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

Use 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, the image must be uploaded to your server. Upload the button image to the images folder in your server and note the path to your image location.

E.g. …

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

You will use this information in Step 3.

In order for someone to be taken 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 link the button graphic 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 Your Sidebar Area Using A Text Widget

Step 3 – Create the HTML 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, we just need to create the instructions linking the graphic image to the destination URL.

Your code can be typed in a simple text editor and will look something like this …

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

  • 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 Contact Button To The Sidebar Menu

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

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

Go back into your Widgets area …

Activate or deactivate widgets using drag & drop

(Widgets Area)

Step 4 – Add a Text widget.

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

In the Available Widgets area, find the Text widget …

WordPress 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

Drag and drop your WordPress text widget

(Drag-and-drop your Text widget)

Step 5 – Configure your text widget settings.

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

WordPress text widget

Add a title section 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 Save when done …

Text widget

Useful Information

Note: Make sure to check all URLs before pasting scripts into your Text Widget, or the button will not work.

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

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

Here is some text with Automatically add paragraphs option unchecked …

Automatically add paragraphs option unchecked

(Automatically add paragraphs option not checked)

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

Automatically add paragraphs option selected

(Automatically add paragraphs option selected)

***

Step 6 – Refresh the browser.

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

Add A Clickable Help Button To The Sidebar Navigation Menu Using A Text Widget

(Clickable button widget on blog sidebar)

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

Step 7 – Test the widget.

The final step is to ensure that your links work. Test this by clicking the help button. You should be taken directly to the support page …

Test the clickable button to ensure it works

(Test your clickable button)

Tip

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 in), then change the button code from this:

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

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

Add A Clickable Contact Button To Your Sidebar Section Using A Text Widget - open in new window

When inserting images into your sidebar navigation section, make sure that the width of the image doesn’t exceed the width of your 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 are wide and some are narrow. If your theme’s sidebar is narrower than the width of the graphic image, then you may need to either adjust the graphic size, or the width of your sidebar column to make the images display correctly on your sidebar section.

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 image in your sidebar, delete the <center> and </center> tags from the beginning and end of the HTML code. The image will then align to the left.
  • Link the help button to any URL you like (e.g. to an external link, helpdesk, forum, etc.) and change this anytime by replacing the code in your widget.

Adding And Configuring WordPress Widgets In Your Website

***

This is the end of part 2 of this tutorial series about how to use WordPress widgets.

Click on this link to continue:

***

"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