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 And Configure Widgets In The WordPress Blog Sidebar AreaIn Part 1 of this step-by-step tutorial, we explained the basics of using widgets in WordPress.

In this tutorial you will configure a number of frequently-used widgets in WordPress.

Sidebar Widget Configuration

By default, your site comes with several preinstalled widgets, such as widgets for displaying external links, filter posts by categories, text or HTML banners, adding tag clouds, etc.

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

(By default, your site comes with a number of preinstalled widgets)

Setting Up Widgets On Your Sidebar: Tutorial

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

  • Adding a clickable Contact Us graphic button linking visitors to your support page.
  • Adding a Categories section.
  • Add a Recent Posts section.
  • Adding a list of your site’s most important Pages.
  • Display important Links on your sidebar.
  • Add an RSS Feed section.
  • Adding tag links with a Tag Cloud.
  • Configure how Archived Posts display on the sidebar.

The Widgets area is located in your WordPress dashboard and can be easily accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This opens the Widgets panel into your browser window …

Widgets Screen

(Widgets Section)

Let’s start by learning how to configure text widgets …

Adding Text Widgets To Your Sidebar

Text widgets are incredibly versatile …

Text widget

(WordPress 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 let you insert just about anything you want into the sidebar or other widget sections, such as lists, ads, forms and more to your site … just type in text or add HTML into the content area. You can also give the widget a title. Remember to save your settings when done …

Text widgets are very useful

(Text widgets are extremely versatile!)

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

For this example, let’s set up a support button on the sidebar navigation menu 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, create or source a “help button” graphic image that visitors can click on …

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

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

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

Step 1 – Upload your image.

Upload the button image to the images folder in your server and note down the URL pointing to your server’s image location.

E.g. …

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

This information will be used in Step 3.

For visitors to be taken to the contact page when they click on the graphic button, either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will then 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 …

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

Step 3 – Compose the 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. In simple terms, we just need to create the instructions for your clickable image.

Your code can be written a simple text file and should look something like this …

Use A Text Widget To Add A Clickable Support Button To Your Sidebar Navigation 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 image below shows which sections of the above code you will need to replace with the actual web addresses …

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

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

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

Next, go back to 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 where you would like the support button to display.

In the Available Widgets area, find the Text widget …

WordPress text widget

(Text widget)

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

Drag-and-drop your Text widget

(Dragging and dropping your Text widget)

Step 5 – Configure the text widget.

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 title section to your widget if you want (e.g. “Need Help?”, “Get Help”, etc.) and paste the code with the correct URLs into the large text box, then click Save when done …

Text widget

Important

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

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

Automatically add paragraphs box unchecked

(Automatically add paragraphs option not checked)

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

Automatically add paragraphs box checked

(Automatically add paragraphs option selected)

***

Step 6 – Refresh your browser.

Once you have added the widget and code content, go to the front-end of your site and refresh the browser. If all links have been entered correctly, then the support button should display in your site’s sidebar menu …

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

(Clickable button widget on sidebar)

The above screenshot shows the support button in the sidebar of a newly-installed WordPress site.

Step 7 – Test the button.

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

Test the clickable button

(Test the text widget to make sure it works)

Practical Tip

Text Widgets – Useful Tips:

If you want a new window to open up when visitors go to your contact page (so they don’t leave the page they’re on), then change the code from this:

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

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

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

When inserting images into your sidebar navigation section, make sure that the width of the image does not exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. As mentioned earlier, some themes may display elements differently depending on their templates and their layout. Some sidebars are wide and some are narrow. If your theme’s sidebar is narrower than the width of the button image, then you may have to either adjust the size of your images, or the column width to make elements display correctly on your sidebar.

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

(Adjust column width or reduce image size)

More Tips:

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

How To Add And Configure WordPress Widgets On The Sidebar

***

This is the end of part two of this series of tutorials on how to use WordPress widgets.

Click on this link to read Part Three:

***

"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com