How To Use And Configure WordPress Widgets – Part 2

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

Adding And Configuring WordPress Widgets In Your SidebarIn Part 1 of this tutorial series, we explained the basics of how to use WordPress widgets.

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

Sidebar Widget Configuration

By default, your site comes with a number of preinstalled widgets, such as widgets that let you display links to your pages, recent posts, RSS feed content, adding search features, etc.

By default, your site comes with several built-in widgets

(By default, your site comes with a number of pre-installed widgets)

Adding Widgets To Your Sidebar: Step-By-Step Tutorial

In this tutorial, you are going to learn how to add, configure and reorder a number of frequently-used WordPress widgets, including:

  • Adding a clickable Support Contact graphic button linking visitors to the help page.
  • Add a Categories section.
  • Adding a Recent Posts section to display your latest posts.
  • Add a list of your site’s main Pages.
  • Display useful Links on your sidebar navigation section.
  • Displaying news items using an RSS Feed section.
  • Adding a Tag Cloud.
  • Configure how your Archived Posts display on your sidebar.

The Widgets screen is located in the WP admin area and can easily be accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This loads the Widgets panel in your browser …

Widgets Panel

(Widgets Section)

Let’s get started …

Adding Text Widgets

Text widgets are versatile …

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)

Text widgets can be used to add quotes, maps and directions, scripts and more to your site … just type in text or insert HTML into the widget content area. You can also give the widget a title. Remember to save your settings …

Text widgets are very useful

(A text widget is really versatile!)

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

For this example, let’s set up a clickable contact button on the sidebar that will take 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, create or source a “help button” graphic image that you will use on your own site …

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

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

Use A Text Widget To Add A Clickable Help Button To Your Sidebar Navigation Menu

Step 1 – Upload your image.

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

E.g. …

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

This information will be used in Step 3.

For visitors to be taken to the contact page when the help button is 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 then link the button graphic to this URL in Step 3

Step 2 – Create your contact page.

Create a contact page and note down its URL …

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

Step 3 – Create the HTML code for your text widget.

Don’t worry … this sounds a lot more technical than it is. In simple terms, you just need to create the instructions for your clickable button.

Your code can be typed in a simple text file and should look something like this …

Add A Contact Button To Your Sidebar Menu 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 which sections of the above code you will need to replace with the actual contact page and image URLs …

Using A Text Widget To Add A Clickable Support Button To Your 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 with basic HTML code, see this tutorial:

Go back into your Widgets area …

Activate or deactivate widgets using drag and 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, select a Text widget …

Text widget

(Text widget)

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

Dragging and dropping your WordPress text widget

(Drag and drop your Text widget)

Step 5 – Configure your 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 the text widget content area and click the save button …

WordPress text widget

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

WordPress text widget

Info

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

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

If you’re 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: 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 option not checked …

Automatically add paragraphs box not checked

(Automatically add paragraphs option not checked)

Here is some text with Automatically add paragraphs option ticked …

Automatically add paragraphs option checked

(Automatically add paragraphs option ticked)

***

Step 6 – Refresh your browser.

After adding your widget and formatted content, go to the front-end of your site and refresh the web browser. If all links have been entered correctly, then the support button should display in the sidebar menu …

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

(Clickable button widget on sidebar)

The above screenshot shows a clickable button in the sidebar navigation area of a newly-installed WordPress site.

Step 7 – Test your widget.

The last step is to ensure that the links work. Test the button to make sure that visitors will go to the contact page when clicking the graphic image. If you are taken to your contact page, then the text widget has been set up correctly …

Test your text widget

(Test the text widget)

Useful Tip

Useful Tips:

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

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

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

Add A Support Button To Your Sidebar Navigation Section 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. Note that some themes may display elements differently depending on their templates and their layout. Some sidebars are wide and some are narrow. If your theme’s sidebar is narrower than the width of your button image, then you may have to either adjust the graphic size, or the column width to make graphics display correctly on your sidebar section.

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

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

Additional Tips:

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

Adding WordPress Widgets To Your Website

***

This is the end of part two of this series of tutorials about using Widgets.

To view the rest of this tutorial, click here:

***

"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)