How To Use And Configure WordPress Widgets – Part 2

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

For a white label version of this tutorial visit WPTrainingManual.com.

Adding And Configuring WordPress Widgets In Your SidebarIn Part One of this tutorial series, we cover the basics of using WordPress widgets.

In this section you will configure a number of frequently-used WordPress sidebar widgets.

Configuring Widgets

By default, your site comes with several built-in widgets that can be used out of the box with little to no configuration required, such as widgets that let you display links to your pages, filter posts by categories, text or HTML banners, adding site search features, etc.

By default, your site comes with several pre-installed widgets

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

How To Configure Sidebar Widgets: Tutorial

In this step-by-step tutorial, we are going to add, configure and reorder s number of widgets to display in the site’s sidebar navigation area, including:

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

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

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This opens the Widgets area into your browser window …

Widgets Area

(Widgets Area)

Let’s get started …

Adding Text Widgets

Text widgets are versatile …

WordPress Text widget

(Text widget)

Useful 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 lets you insert just about anything you want into your sidebar menu or other widget sections, such as email and contact information, maps and directions, reviews and more to your site … simply by typing in text or pasting HTML into the content area. You can also add an optional title in the Title field. Remember to save your settings when done …

Text widgets are really useful

(Text widgets are extremely versatile!)

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

For this example, we’ll set up a clickable contact button on the sidebar area 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 graphic image that you will want your your visitors to click on …

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

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

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

Step 1 – Upload your image.

Upload the graphic image to your server’s images folder and note down the path to your server’s image location.

E.g. …

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

You will use this information in Step 3.

For someone to go to your contact page when the help button gets clicked, you will need to either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link the button image to this URL in Step 3

Step 2 – Add the support page.

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

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

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. Basically, you just need to create the instructions linking the button image to your destination URL.

Your instructions can be typed in a plain text editor and should look something like this …

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

  • 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 above 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 your actual contact details …

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

Replace the above URLs and then copy all of your text file content to your clipboard when finished.

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

Next, go back to your Widgets screen …

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

In the Available Widgets area, select the Text widget …

Text widget

(WordPress text widget)

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

Drag-and-drop your WordPress text widget

(Dragging and dropping your WordPress text widget)

Step 5 – Configure the text widget settings.

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

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

WordPress text widget

Important Info

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

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

If 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 paragraphs (note: this is not necessary if you’re typing in HTML content like we’re doing in this tutorial).

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

Automatically add paragraphs box not selected

(Automatically add paragraphs option not ticked)

Here is some text with Automatically add paragraphs option ticked …

Automatically add paragraphs box ticked

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh your web browser.

After adding the widget and formatted content, visit the front end of your site and refresh the browser. If you have entered all of the links correctly, then the clickable support button should display in the site’s sidebar menu …

Use A Text Widget To Add A Support Button To Your Sidebar Area

(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 make sure that your clickable button works. Test this by clicking on the button. If you are taken to your support page, then your text widget has been set up correctly …

Test your clickable button to ensure you've set everything up correctly

(Test the clickable button)

Useful Tip

Tips:

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

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

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

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

When inserting images into your sidebar menu, make sure that the width of your image does not exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. Note that some themes can display different column widths depending on their templates and their layout. Some sidebars are wide and some are narrow. If the sidebar of your theme is narrower than the width of the button images, then you may have to either adjust the image size, or the width of your sidebar column to make graphics display correctly on your sidebar area.

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

(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 code. The image will then be aligned to its default settings (normally left-aligned).
  • Link your help button to any URL you want (e.g. to an external link, helpdesk, forum, etc.) and change this anytime by editing the code in the widget.

How To Use Widgets In WordPress

***

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

For a white label version of this tutorial visit WPTrainingManual.com.
Originally published as How To Use And Configure WordPress Widgets – Part 2.