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 explained the basics of using WordPress widgets.

In this tutorial you will configure various widgets in WordPress.

Configuring Sidebar Widgets

In a default WordPress installation, your site comes with a number of built-in widgets that can be used out of the box with minimal to no configuration required, such as widgets that let you display links to your pages, recent posts, RSS feed content, adding tag clouds, etc.

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

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

How To Add And Configure Widgets On Your Blog Sidebar: Tutorial

In this step-by-step tutorial series, you are going to add, configure and reorder a number of commonly-used widgets, including:

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

The Widgets area is located inside your dashboard area by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets panel in your browser …

Widgets Screen

(Widgets Panel)

Let’s start to configure some sidebar menu widgets …

Add A Text Widget

Text widgets are incredibly versatile …

WordPress 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 your sidebar or other widget sections, such as article snippets, images, tips and more to your site … just by typing in text or inserting 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 versatile!)

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

For this example, we’ll set up a contact button on the sidebar navigation section 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 …

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

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

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

Step 1 – Upload your image.

Upload the graphic image to a folder on your server and note the URL pointing to your image location.

E.g. …

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

You will need this information in Step 3.

In order for someone to be taken to the contact page when the support button is clicked, either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will then link your button image to this URL in Step 3

Step 2 – Add the contact page.

Create a contact page and note the page URL …

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

Step 3 – Create 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, we just need to create the instructions linking the graphic image to the contact page/helpdesk.

Your code can be composed in a plain text editor and will look something like this …

Add A Clickable Support Button To The Sidebar Menu 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 code you will need to replace with the actual web addresses …

Add A Clickable Help Button To Your Sidebar Menu 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:

Next, go back into your Widgets screen …

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 want your button to display.

In the Available Widgets area, find the Text widget …

Text widget

(WordPress text widget)

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

Drag and drop your Text widget

(Drag-and-drop your Text widget)

Step 5 – Configure the text widget.

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

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 destination links into the large text box, then click the save button …

Text widget

Useful Information

Note: Remember to check all links before pasting scripts into your Text Widget, or the clickable button will not 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 paragraphs (note: this is not necessary if you paste in formatted HTML content like we’re using in the example for this tutorial).

Here is some text with Automatically add paragraphs box not ticked …

Automatically add paragraphs box unchecked

(Automatically add paragraphs option unchecked)

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

Automatically add paragraphs box ticked

(Automatically add paragraphs option selected)

***

Step 6 – Refresh the web browser.

After adding the text widget and formatted content, visit your site and refresh your browser. If you have entered all of the links correctly, then your support button will display at the top of your sidebar menu …

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

(Clickable support button widget on blog sidebar)

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

Step 7 – Test the button.

The last step is to ensure that the destination URL works. Test this by clicking the button. You should be taken directly to the contact page …

Test your text widget

(Test your clickable button)

Practical Tip

Text Widgets – Useful Tips:

If you would like the support page to display inside a new window when visitors click on the help (so they don’t leave the page they’re on), then change the text widget code from this:

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

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

Use A Text Widget To Add A Clickable Help Button To Your Sidebar Navigation Menu - open in new window

When choosing images for your sidebar navigation menu, make sure that the width of your image doesn’t exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. As we’ve previously mentioned, some themes can display different column widths depending on their templates and their layout. Some sidebars may be wider or narrower. If your theme’s sidebar is narrower than the width of your graphic image, then you may need to either adjust the graphic size, or the width of your sidebar column to make the 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 the button image to be centered inside your sidebar, delete the <center> and </center> tags from the beginning and end of the HTML code. The image will then align to the left.
  • You can link your help button to any URL you like (e.g. to an external site, helpdesk, FAQ page, etc.) and change this anytime by editing the links inside your widget.

How To Add Widgets To WordPress

***

This is the end of part 2 of this tutorial series about using Widgets.

To view Part 3, click here:

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org