How To Use And Configure WordPress Widgets – Part 2

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

Adding WordPress Widgets To The WebsiteIn Part One of this step-by-step tutorial, we cover the basics of using widgets in WordPress.

In this tutorial you are going to learn how to configure several widgets in WordPress.

Sidebar Widget Configuration

By default, your site comes with several built-in widgets, such as widgets that let you display links to your pages, recent posts, text or HTML banners, add site search features, etc.

By default, 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 Set Up Commonly-Used WordPress Sidebar Widgets In WordPress: Tutorial

In this tutorial series, you are going to add, configure and reorder s number of widgets, including:

  • Add a clickable Help image linking to the contact page.
  • Adding a Categories section with a drop down menu.
  • Add a Recent Posts section.
  • Adding a list of the site’s main Pages.
  • Display Links on your sidebar navigation area.
  • Displaying newsfeeds using an RSS Feed section.
  • Adding tags to the sidebar using a Tag Cloud section.
  • Add and configure an Archives section to your sidebar.

The Widgets area is located inside your administration area 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 Screen

(Widgets Screen)

Let’s get started …

Add A Text Widget To The Sidebar

Text widgets are quite 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)

Text widgets can be used to add notices, maps and directions, forms and more to your site … just by typing in text or adding 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

(Text widgets are really useful!)

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

For this example, let’s set up a contact button on the 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, you will need to create or source a graphic image that you will use on your own site …

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

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

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

Step 1 – Upload your image.

To display the clickable image on your site, the graphic image must be uploaded to your server. Upload your button graphic to the images folder in your server and note the path to your image location.

For example …

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

You will need this information in Step 3.

For someone to be taken to the contact page when the graphic button is clicked, 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 destination page.

Create a contact page and note the page URL …

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

Step 3 – Compose the HTML code for your text widget.

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 instructions can be composed in a simple text file and will look something like this …

Use A Text Widget To Add A Clickable Support Button To The 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 with the URL of your image location.

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

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

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

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

Now, go back into your Widgets section …

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

In the Available Widgets area, select the Text widget …

WordPress 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

(Dragging and dropping your WordPress text widget)

Step 5 – Configure your text widget.

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

Text widget

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

WordPress text widget

Important

Note: Make sure to test your contact page and image URLs before pasting scripts into the Text Widget, or your 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 paragraphs (note: this is not necessary if you’re typing in formatted content like we’re using in the example for this tutorial).

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

Automatically add paragraphs box not ticked

(Automatically add paragraphs option not ticked)

Here is some text with Automatically add paragraphs option checked …

Automatically add paragraphs option checked

(Automatically add paragraphs option ticked)

***

Step 6 – Refresh your web browser.

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

Add A Contact Button To The Sidebar Menu Using A Text Widget

(Clickable support button widget on sidebar)

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

Step 7 – Test the widget.

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

Test the text widget

(Test your clickable button to make sure you’ve set everything up correctly)

Practical Tip

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

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

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

Use A Text Widget To Add A Clickable Support Button To Your Sidebar Section - open in new window

When inserting images into your sidebar area, 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. Note that some themes may 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 your graphic images, then you may need to either adjust the size of your images, or the width of your sidebar column to make images display correctly on your sidebar area.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

More Tips:

  • If you don’t want your image to be centered inside your sidebar, delete the <center> and </center> tags from the beginning and end of the HTML code. The image will then be left-aligned.
  • You can link your help button to any URL you want (e.g. to an external link, helpdesk, support forum, etc.) and change this anytime by replacing the content inside the text widget.

How To Add Widgets To The WordPress Sidebar

***

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

Click on this link to access Part Three:

***

"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)