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 WordPress Widgets In Your BlogIn Part 1 of this tutorial, we explained the basics of how to use WordPress widgets.

In this section you will configure a number of sidebar widgets in WordPress.

Widget Configuration

By default, your site comes with several preinstalled widgets, such as widgets for displaying external links, recent posts, RSS feed content, adding tag clouds, etc.

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

(By default, your site comes with a number of pre-installed widgets)

Adding Commonly-Used Widgets To Your Sidebar Menu: Step-By-Step Tutorial

In this tutorial series, we are going to add, configure and reorder various commonly-used WordPress widgets, including:

  • Adding a Support Contact graphic button linking visitors to the contact page.
  • Adding a Categories section.
  • Adding a Recent Posts section.
  • Add a list of the site’s Pages.
  • Display a list of useful Links on the sidebar menu.
  • Adding an RSS Feed section.
  • Adding a list of clickable tags through a Tag Cloud.
  • Add and configure an Archives section to the sidebar menu.

The Widgets section can be accessed inside the admin by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets screen in your browser …

Widgets Panel

(Widgets Screen)

Let’s get started …

Text Widgets

Text widgets are incredibly versatile …

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

A text widget can be used to add lists, image links, messages and more to your site … just type in text or paste 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 versatile

(A text widget is very useful!)

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

For this example, let’s set up a clickable 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, create or source a graphic image that your visitors can click on …

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

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

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

Step 1 – Upload your image.

To display the clickable image on your site, first you must upload the graphic image to your server’s images folder and note down the URL pointing to your image location.

For example …

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

This information will be used in Step 3.

In order for visitors to go to the contact page when the support button is clicked, you must either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link your button graphic to this URL in Step 3

Step 2 – Create the destination page.

Create a contact page on your site and note the page URL …

Add A Clickable Help Button To The Sidebar Section Using A Text Widget

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 for your clickable image.

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

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

  • Replace “http://www.yourdomain.com/contact-us” in the code above 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 the sections of the above sample code that you will need to replace with the actual contact details …

Add A Support Button To The 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 with basic HTML code, see this tutorial:

Now, go back into your Widgets area …

Activate or deactivate widgets using drag & drop

(Widgets Screen)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar where you want your clickable button to display.

In the Available Widgets area, find 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

Dragging and dropping your Text widget

(Dragging and dropping your WordPress text widget)

Step 5 – Configure your widget.

Click on the Text 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 the save button …

WordPress text widget

Add a title section to the widget if you want (e.g. “Need Help?”, “Get Help”, etc.) and paste the code with the correct destination URLs into the text area, then click Save when done …

Text widget

Useful Information

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

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

If 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 paste in 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 selected …

Automatically add paragraphs box unchecked

(Automatically add paragraphs box not checked)

Here is some text with Automatically add paragraphs option ticked …

Automatically add paragraphs option ticked

(Automatically add paragraphs box checked)

***

Step 6 – Refresh the browser.

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

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

(Clickable support button widget on sidebar)

The screenshot above shows the support contact button added to a newly-installed WordPress site.

Step 7 – Test the button.

The final step is to make sure that the destination URL works. Test your button to make sure that your visitors will go to your support page when they click on the graphic image. If you are taken to the support page, then the text widget has been set up correctly …

Test the text widget to make sure you've set everything up correctly

(Test your text widget)

Tip

Useful Tips:

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

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

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

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

When choosing images for your sidebar navigation area, make sure that the width of the image does not exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. As mentioned earlier, some themes may display different column widths 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 your graphic images, then you may have to either adjust the size of your images, or the width of your sidebar column to make elements display correctly on your sidebar section.

Adjust column width or reduce image size

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

More Tips:

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

Adding And Configuring Widgets On The Blog Sidebar Navigation Area

***

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

Click on this link to continue reading:

***

"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum