Blog

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 Widgets To WordPressIn Part 1 of this tutorial series, we cover the basics of using WordPress widgets.

In this tutorial you will learn how to configure various WordPress sidebar widgets.

Widget Configuration

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

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

(In a default WordPress installation, your site comes with a number of preinstalled widgets)

Adding Widgets To The Sidebar: Tutorial

In this step-by-step tutorial series, you will add, configure and reorder s number of widgets, including:

  • Add a clickable Support graphic button linking visitors to the support page.
  • Adding a Categories section with a drop down menu.
  • Add a Recent Posts section to display your latest posts.
  • Adding a list of your site’s main Pages.
  • Display useful Links on the sidebar navigation area.
  • Displaying news items using an RSS Feed section.
  • Add a Tag Cloud section.
  • Add and configure an Archives section to your sidebar menu.

The Widgets area is located in the WP administration area and can be accessed from the WordPress admin menu by clicking on Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This opens the Widgets panel into your browser …

Widgets Screen

(Widgets Screen)

Let’s start by configuring WordPress text widgets …

Text Widgets

Text widgets are versatile …

Text widget

(WordPress Text widget)

Important

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 notices, ads, forms and more to your site … just type in text or paste HTML into the widget content area. You can also add an optional title in the Title field. Remember to save your settings …

A text widget is really useful

(Text widgets are extremely versatile!)

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

For this example, we’ll set up a clickable help button on your sidebar 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 you can use on your own site …

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

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

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

Step 1 – Upload your image.

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

E.g. …

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 then link the button graphic to this URL in Step 3

Step 2 – Create the contact page.

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

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

Step 3 – Compose your text widget code.

If you’re not a technical-minded person, don’t worry … this sounds a lot more technical than it is. In simple terms, you just need to create the instructions linking the graphic image to the contact page/helpdesk.

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

Using A Text Widget To Add A Clickable Contact Button To Your 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 which sections of the above sample code you will need to replace with your actual contact details …

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

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

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

Go back into 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 in the location where your clickable button should display.

In the Available Widgets area, find the Text widget …

Text widget

(Text widget)

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

Drag-and-drop your WordPress text widget

(Drag-and-drop your Text widget)

Step 5 – Configure your text widget.

Click on the Text widget title bar to configure the widget options. Paste the code with the URLs 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 URLs into the text area, then click the save button …

WordPress text widget

Info

Note: Make sure to check your contact page and image links before pasting scripts into the Text Widget, or the clickable button won’t work.

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

If you’re adding text without formatting tags like paragraph breaks, you may want to tick the Automatically add paragraphs box to wrap each block of text in an HTML paragraph code (note: not required if you’re pasting in HTML content like we’re doing in this tutorial).

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

Automatically add paragraphs option not ticked

(Automatically add paragraphs box not checked)

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

Automatically add paragraphs box ticked

(Automatically add paragraphs option selected)

***

Step 6 – Refresh the web browser.

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

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

(Clickable button widget on sidebar)

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

Step 7 – Test your widget.

The final step is to make sure that the clickable button works. Test the button to make sure that your visitors will go to the support page when clicking the button. If you are taken directly to the support page, then everything has been set up correctly …

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

(Test your text widget to make sure you’ve set up everything correctly)

Tip

Useful Tips:

If you would like a new browser 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:

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

To this (i.e. include the part that says: target=”_blank” in your code):

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

When choosing images to add to your sidebar area, make sure that the width of the image doesn’t exceed the width of the 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 layout. Some sidebars may be too wide or too narrow. If the sidebar of your theme is narrower than the width of the graphic image, then you may have to either adjust the size of your images, or the width of your sidebar column to make graphics display correctly on your sidebar section.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

Additional Tips:

  • If you don’t want to center your button image inside the sidebar, delete the <center> and </center> tags from the beginning and end of the HTML code. The image will then align to the left.
  • Link the support button to any URL you want (e.g. to an external link, contact form, forum, etc.) and change this anytime by editing the content inside the widget.

How To Add And Configure WordPress Widgets In The Website

***

This is the end of section two of this tutorial series about how to use WordPress widgets.

Click on this link to keep reading:

***

"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum