How To Use And Configure WordPress Widgets – Part 2

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

For a whitelabel version of this tutorial visit WPTrainingManual.com.

Adding WordPress Widgets To The WebsiteIn Part One of this tutorial series, we explained the basics of how to use WordPress widgets.

In this section we are going to show you how to configure various frequently-used WordPress widgets.

How To Configure Frequently-Used WordPress Widgets

By default, your site comes with several preinstalled widgets, such as widgets that let you display links to your pages, filter posts by categories, newsfeeds, add search features, etc.

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

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

Adding Sidebar Widgets In WordPress: Tutorial

In this tutorial, you will learn how to add, configure and reorder a number of commonly-used widgets to display in your site’s sidebar, including:

  • Adding a clickable Contact Us graphic linking visitors to your contact page.
  • Add a Categories section with a drop down menu.
  • Add a Recent Posts section.
  • Adding a list of the site’s main Pages.
  • Display a list of useful Links on the sidebar navigation menu.
  • Displaying news items with an RSS Feed section.
  • Add a list of clickable tags through a Tag Cloud section.
  • Adding and configuring an Archives section to your sidebar navigation menu.

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

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets section in your web browser …

Widgets Area

(Widgets Screen)

Let’s get started …

Add A Text Widget

Text widgets are 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)

Text widgets let you insert just about anything you want into your sidebar navigation section or other widget sections, such as comments, social media buttons, news and updates and more to your site … simply by typing in text or adding HTML into the content area. You can also add an optional title in the Title field. Remember to save your settings …

Text widgets are really versatile

(A text widget is very useful!)

Example: Using A Text Widget To Add A Support Button To The Sidebar Menu

For this example, we’ll set up a clickable contact button on your sidebar section 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, you will need to create or source a graphic image that your visitors can click on …

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

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

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

Step 1 – Upload your image.

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

E.g. …

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

This information will be required in Step 3.

In order for visitors to go to your contact page when the graphic button gets clicked, 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 graphic to this URL in Step 3

Step 2 – Create your destination page.

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

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

Step 3 – Compose the HTML 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 for your clickable image.

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

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

  • 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 which sections of the above sample code you will need to replace with the actual contact details …

Add A Support Button To Your Sidebar Menu 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 & drop

(Widgets Screen)

Step 4 – Add a Text widget.

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

In the Available Widgets area, select the Text widget …

Text widget

(WordPress text widget)

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

Dragging and dropping your WordPress text widget

(Drag-and-drop 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 links to your contact page and graphic button into the text widget content area and click the save button …

Text widget

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

WordPress text widget

Useful Information

Note: Make sure to check your contact page and button image URLs before pasting scripts into your Text Widget, or the 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’re typing 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 selected …

Automatically add paragraphs box unchecked

(Automatically add paragraphs box unchecked)

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

Automatically add paragraphs box selected

(Automatically add paragraphs box selected)

***

Step 6 – Refresh your browser.

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

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

(Clickable button widget on blog sidebar)

The screenshot above shows a clickable button added to a newly-installed WordPress site.

Step 7 – Test your widget.

The last step is to ensure that the links work. Test your button to make sure that your visitors will go to the contact page when clicking the graphic image. You should be taken to your contact page …

Test the text widget to ensure it works

(Test the text widget)

Useful Tip

Text Widgets – Useful Tips:

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

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

To this (i.e. add 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 for your sidebar section, 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. As we’ve previously explained, some themes can display different column widths depending on their templates and their layout. Some sidebars may be too wide or too narrow. If the sidebar of your theme is narrower than the width of your graphic images, then you may need to either adjust the graphic size, or the width of your sidebar column to make images display correctly on your sidebar area.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

More Tips:

  • If you don’t want to center your button image inside your 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 the contact button to any destination you like (e.g. to an external link, helpdesk, forum, etc.) and change this anytime by editing the content in your widget.

How To Add WordPress Widgets To Your Blog

***

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

Click here to keep 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 whitelabel version of this tutorial visit WPTrainingManual.com.
Originally published as How To Use And Configure WordPress Widgets – Part 2.