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 SidebarIn Part One of this tutorial series, we cover the basics of using widgets in WordPress.

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

Sidebar Widget Configuration

In a default WordPress installation, your site comes with a number of built-in active widgets, such as widgets that let you display links to your pages, filter posts by categories, text or HTML banners, adding search features, etc.

By default, your site comes with several built-in widgets

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

How To Add Sidebar Widgets In WordPress: Tutorial

In this step-by-step tutorial series, we will add, configure and reorder s number of WordPress widgets, including:

  • Add a Contact Us graphic linking visitors to the contact page.
  • Adding a Categories section.
  • Add a Recent Posts section.
  • Add a list of the site’s main Pages.
  • Display useful Links on your sidebar.
  • Display the latest news using an RSS Feed section.
  • Add a Tag Cloud section.
  • Configure how Archived Posts display on the sidebar navigation section.

The Widgets section is located inside your WordPress administration area and can be easily accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets panel in your web browser …

Widgets Panel

(Widgets Area)

Let’s get started …

Adding Text Widgets To The Sidebar

Text widgets are versatile …

Text widget

(Text widget)

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 lists, images, tips and more to your site … simply type in text or add HTML into the content area. You can also add an optional title in the Title field. Remember to save your settings …

A text widget is very useful

(Text widgets are extremely versatile!)

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

For this example, let’s set up a support button on the sidebar menu 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 “help button” graphic image that you will use on your own site …

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

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

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

Step 1 – Upload your image.

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

E.g. …

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

You will need this information in Step 3.

In order for visitors to go to the contact page when they click on the help 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 your button image to this URL in Step 3

Step 2 – Add your destination page.

Create a contact page and note its URL …

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

Step 3 – Compose the code for your text widget.

Don’t worry … this sounds a lot more technical than it is. In simple terms, you just need to create the instructions linking the button image to your contact page/helpdesk.

Your code can be typed into a simple text editor and should look something like this …

Using A Text Widget To Add A Clickable Contact Button To The Sidebar Navigation Section

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

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

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

Go back into your Widgets section …

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

In the Available Widgets area, select the Text widget …

WordPress text widget

(WordPress text widget)

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

Drag and drop your WordPress text widget

(Drag and drop your Text widget)

Step 5 – Configure your widget settings.

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

WordPress text widget

Add a heading to your 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

Info

Note: Remember to check all links before pasting scripts into your Text Widget, or the clickable button won’t work.

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

If you’re adding text with no 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: not required if you type in formatted HTML code like we’re doing in this tutorial).

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

Automatically add paragraphs option not checked

(Automatically add paragraphs box not selected)

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 your text widget and code, go to the front end of your site and refresh your web browser. If you have entered all of the links correctly, then your support button will display at the top of the sidebar menu …

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

(Clickable support button widget on sidebar)

The screenshot above shows ’click for help’ button in the sidebar of a brand new WordPress site.

Step 7 – Test the widget.

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

Test the text widget to ensure it works

(Test your clickable button to make sure it works)

Useful Tip

Tips:

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

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

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

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

When choosing images to add to your sidebar area, 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. Note that some themes can display elements differently depending on their templates and their layout. Some sidebars may be wider or narrower. If your theme’s sidebar width is narrower than the width of the graphic image, then you may need to either adjust the size of your images, or the width of your sidebar column to make the images display correctly on your theme.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

More Tips:

  • If you don’t want your button 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 left-aligned.
  • Link your contact button to any destination you like (e.g. to an external site, contact form, forum, etc.) and change this anytime by replacing the links inside your text widget.

Adding And Configuring Widgets On The Blog Sidebar

***

This is the end of section 2 of this series of tutorials.

To view the rest of this tutorial, click this link:

***

"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)