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

In this section you are going to configure various widgets in WordPress.

How To Configure Sidebar Widgets

In a default WordPress installation, your site comes with several preinstalled 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, filter posts by categories, RSS feed content, adding tag clouds, etc.

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

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

How To Set Up Widgets On The Blog Sidebar Navigation Menu: Step-By-Step Tutorial

In this tutorial series, we will add, configure and reorder s number of widgets, including:

  • Add a clickable Help button linking to the contact page.
  • Adding a Categories section with a drop down menu.
  • Add a Recent Posts section to display your latest posts.
  • Add a list of the site’s main Pages.
  • Display useful Links on your sidebar menu.
  • Add an RSS Feed section.
  • Adding a Tag Cloud section.
  • Adding and configuring an Archives section to the sidebar.

The Widgets screen is located in your WordPress administration area and can be accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets screen into your browser window …

Widgets Section

(Widgets Area)

Let’s start configuring some sidebar menu widgets …

Adding Text Widgets To Your Sidebar Navigation Section

Text widgets are incredibly versatile …

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 the sidebar navigation menu or other widget sections, such as email and contact information, ads, tips and more to your site … just by typing in text or adding HTML into the widget 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 versatile!)

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

For this example, we’ll set up a clickable contact button on the sidebar section that takes 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 visitors can click on …

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

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

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

Step 1 – Upload your image.

To display the clickable image on your site, the button image must be uploaded to your server. Upload your image to the images folder in your server and write down the path to your image location.

For example …

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

You will use this information in Step 3.

In order for visitors to go to the contact page when they click on the support button, you must 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 – Create the support page.

Create a contact page and note its URL …

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

Step 3 – Create the HTML 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. In simple terms, you just need to create the instructions linking your button image to your contact page.

Your code can be typed into a simple text file and will look something like this …

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

  • Replace “http://www.yourdomain.com/contact-us” in the code 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 need to replace with the actual contact page and image URLs …

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

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

If you need help figuring out basic HTML code, see this tutorial:

Now, go back into your Widgets panel …

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

In the Available Widgets area, find the Text widget …

WordPress text widget

(WordPress text widget)

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

Drag and drop your WordPress text widget

(Dragging and dropping your Text widget)

Step 5 – Configure the widget.

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

WordPress text widget

Add a title to the 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 …

WordPress text widget

Important

Note: Remember to test all links before pasting scripts into the Text Widget, or your 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 an HTML paragraph code (note: not required if you type in HTML content like we’re using in the example for this tutorial).

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

Automatically add paragraphs box not checked

(Automatically add paragraphs option not ticked)

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

Automatically add paragraphs box selected

(Automatically add paragraphs box selected)

***

Step 6 – Refresh your browser.

After adding the widget and code content, visit your site and refresh the web browser. If all links have been entered correctly, then the support button should display in the sidebar menu …

Using A Text Widget To Add A Contact Button To The Sidebar Menu

(Clickable button widget on blog sidebar)

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

Step 7 – Test the button.

The final step is to ensure that the destination URL works. Test this by clicking on the button. If you are taken to the support page, then the text widget has been set up correctly …

Test your clickable button

(Test the text widget to make sure it works)

Practical Tip

Text Widgets – Useful Tips:

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

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

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

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

When choosing images for your sidebar section, 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. 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 your theme’s sidebar width is narrower than the width of your button image, then you may have to either adjust the size of your images, or the width of your sidebar column to make images display correctly on your theme.

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

(Adjust column width or reduce image size)

Extra Tips:

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

Configuring Widgets On Your Sidebar

***

This is the end of section two of this tutorial series on using WordPress widgets.

To continue reading, click here:

***

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