How To Use And Configure WordPress Widgets – Part 2

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

Using WordPress WidgetsIn Part 1 of this step-by-step tutorial series, we explained the basics of how to use WordPress widgets.

In this tutorial we are going to show you how to configure a number of commonly-used WordPress sidebar widgets.

Widget Configuration

By default, your site comes with several built-in widgets that can be used out of the box with minimal to no configuration needed, such as widgets that let you display links to your pages, filter posts by categories, RSS feed content, adding a search box, etc.

In a default WordPress installation, your site comes with several preinstalled widgets

(By default, your site comes with several preinstalled widgets)

Adding Widgets To Your WordPress Sidebar Menu: Tutorial

In this step-by-step tutorial, we are going to add, configure and reorder various widgets, including:

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

The Widgets panel is located in your WP administration area and can be easily accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings you to the Widgets area in your browser window …

Widgets Area

(Widgets Screen)

Let’s begin to configure your widgets …

Add A Text Widget To The Blog Sidebar Area

Text widgets are 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 menu or other widget sections, such as lists, images, forms and more to your site … just by typing in text or adding HTML into the widget content area. You can also give the widget a title. Remember to save your settings when done …

Text widgets are really useful

(A text widget is versatile!)

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

For this example, we’ll set up a clickable help button on the sidebar navigation 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 Support Button To Your Sidebar Navigation Area

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

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

Step 1 – Upload your image.

To display the clickable 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

You will need this information in Step 3.

In order for visitors to be taken to the contact page when the support 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 link the button graphic to this URL in Step 3

Step 2 – Add your contact page.

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

Use A Text Widget To Add A Clickable Contact Button To The Sidebar Navigation Menu

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. Basically, we just need to create the instructions for your clickable image.

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

Add A Clickable Contact Button To The 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 above with the URL of your image location.

The screenshot below shows the sections of the above sample code that you will need to replace with the actual contact page and image URLs …

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

Replace the above URLs and then copy the above code to your clipboard when finished.

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

Next, go back to your Widgets section …

Activate or deactivate widgets using drag-and-drop

(Widgets Area)

Step 4 – Add a Text widget.

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

In the Available Widgets area, find a Text widget …

Text widget

(Text widget)

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

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

Text widget

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

WordPress text widget

Info

Note: Make sure to check all links before pasting scripts into the Text Widget, or your 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 paragraphs (note: not required if you’re typing in 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 not checked

(Automatically add paragraphs option not ticked)

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

Automatically add paragraphs option ticked

(Automatically add paragraphs box selected)

***

Step 6 – Refresh your browser.

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

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

(Clickable button widget on blog sidebar)

The screenshot above shows the button added to a brand new WordPress site.

Step 7 – Test the widget.

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

Test the text widget to ensure it works

(Test your text widget)

Tip

Tips:

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

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

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

Use A Text Widget To Add A Clickable Support Button To The Sidebar Area - open in new window

When choosing images to add to your sidebar navigation section, make sure that the width of the image does not exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. Note that some themes may 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 button image, then you may have to either adjust the image size, or the column width to make elements display correctly on your theme.

Adjust column width or reduce image size

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

Extra Tips:

  • If you don’t want to center the button inside your sidebar, delete the <center> and </center> tags from the beginning and end of the HTML code. The image will then be aligned to its default settings (normally left-aligned).
  • You can link your contact button to any URL you like (e.g. to an external site, helpdesk, forum, etc.) and change this anytime by replacing the links in the text widget.

How To Add And Configure Widgets In The WordPress Blog Sidebar Menu

***

This is the end of section 2 of this tutorial about how to use Widgets.

To continue, 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)