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 1 of this step-by-step tutorial series, we explained the basics of how to use WordPress widgets.

In this tutorial you will begin configuring a number of widgets in WordPress.

How To Configure Sidebar Widgets

In a default WordPress installation, your site comes with several pre-installed widgets that can be used out of the box with minimal to no configuration needed, such as widgets that let you display external links, filter posts by categories, text or HTML banners, adding site search features, etc.

In a default WordPress installation, your site comes with a number of built-in widgets

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

How To Add Widgets To Your Sidebar Menu: Step-By-Step Tutorial

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

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

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

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets panel in your browser …

Widgets Screen

(Widgets Screen)

Let’s get started …

Adding Text Widgets To Your Sidebar

Text widgets are incredibly versatile …

Text widget

(WordPress Text widget)

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

A text widget can be used to add single lines or paragraphs of text, maps and directions, scripts and more to your site … just 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 versatile

(Text widgets are extremely versatile!)

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

For this example, let’s set up a clickable help button on your 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 visitors can click on …

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

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

Add A Clickable Contact Button To The Sidebar Navigation Menu 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 image to a folder on your server and note the address of your image location.

For example …

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

You will need this information in Step 3.

In order for visitors to go to your 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 the button image to this URL in Step 3

Step 2 – Add a destination page.

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

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

Step 3 – Create the code for your text widget.

Don’t worry … this sounds a lot more technical than it is. Basically, you just need to create the instructions linking your graphic image to the destination URL.

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

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

  • 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 code you need to replace with your actual contact page and image URLs …

Use A Text Widget To Add A 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 figuring out basic HTML code, see this tutorial:

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

In the Available Widgets area, select a Text widget …

Text widget

(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 Text widget

(Drag and drop your Text widget)

Step 5 – Configure your widget settings.

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

WordPress 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 URLs into the large text box, then click Save when done …

Text widget

Info

Note: Remember to check your contact page and image links before pasting scripts into your Text Widget, or your button will not work.

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

If you’re adding text without 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 pasting in formatted HTML code like we’re using in the example for this tutorial).

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

Automatically add paragraphs option not selected

(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 the browser.

Once you have added the widget and content, visit your site and refresh the web browser. If you have entered all of the links correctly, then your clickable support button should display at the top of your sidebar menu …

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

(Clickable button widget on blog sidebar)

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

Step 7 – Test your button.

The last step is to ensure that your clickable button works. Test the button to make sure that your visitors will go to the help page when they click on the button. If you are taken directly to your contact page, then everything has been set up correctly …

Test the text widget to make sure it works

(Test the clickable button)

Tip

Text Widgets – Useful Tips:

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

Use A Text Widget To Add A Support Button To The Sidebar Navigation Section

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

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

When adding images to your sidebar area, make sure that the width of your 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 may be too wide or too narrow. If the sidebar of your theme is narrower than the width of your button images, then you may have to either adjust the image size, or the column width to make graphics display correctly on your theme.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

Additional Tips:

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

Using Widgets In WordPress

***

This is the end of part 2 of this tutorial on how to use Widgets.

To keep reading, click here:

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org