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 Widgets On The Sidebar SectionIn Part 1 of this step-by-step tutorial series, we cover the basics of how to use WordPress widgets.

In this section we are going to show you how to configure a number of widgets in WordPress.

Widget Configuration

By default, your site comes with several preinstalled widgets that can be used out of the box with little to no configuration required, such as widgets that let you display links to your pages, filter posts by categories, news items, add search features, etc.

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

(In a default WordPress installation, your site comes with several active widgets)

How To Add Sidebar Widgets In WordPress: Tutorial

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

  • Add a clickable Support graphic button linking to the help page.
  • Add a Categories section.
  • Adding a Recent Posts section to display the latest posts.
  • Adding a list of your site’s main Pages.
  • Display Links on the sidebar area.
  • Add an RSS Feed section.
  • Add a list of clickable tags using a Tag Cloud.
  • Add and configure an Archives section to the sidebar.

To use widgets, access the Widgets area located inside the WP dashboard by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This opens the Widgets screen in your web browser …

Widgets Panel

(Widgets Area)

Let’s begin configuring your widgets …

Adding Text Widgets To Your Blog Sidebar

Text widgets are incredibly useful …

Text widget

(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, social media buttons, messages 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 when done …

A text widget is really useful

(Text widgets are very useful!)

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

For this example, we’ll set up a support button on your sidebar area 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 “help button” graphic image that visitors can click on …

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

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

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

Step 1 – Upload your image.

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

For example …

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 they click on the help button, you must either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link your button image to this URL in Step 3

Step 2 – Create a destination page.

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

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

Step 3 – Create your text widget code.

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

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

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

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

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

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

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

Now, 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 the support button to display.

In the Available Widgets area, select a Text widget …

Text widget

(WordPress text widget)

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

Dragging and dropping your WordPress text widget

(Dragging and dropping your Text widget)

Step 5 – Configure the text widget.

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 your text widget content area and click save …

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 destination URLs into the text area, then click the save button …

WordPress text widget

Useful Info

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

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

Automatically add paragraphs box not checked

(Automatically add paragraphs box not selected)

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

Automatically add paragraphs option ticked

(Automatically add paragraphs box checked)

***

Step 6 – Refresh the web browser.

After adding your text widget and HTML code, go to the front-end of your site and refresh your browser. If all links have been entered correctly, then the support button should display at the top of the site’s sidebar menu …

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

(Clickable button widget on sidebar)

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

Step 7 – Test your button.

The final step is to make sure that the destination URL works. Test this by clicking the button. You should be taken directly to your support page …

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

(Test the text widget)

Practical Tip

Useful Tips:

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

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

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

Add A Clickable Support Button To Your Sidebar Navigation Area Using A Text Widget - open in new window

When choosing images to add to your sidebar 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. Note that some themes can display different column widths depending on their templates and their layout. Some sidebars are wide and some are narrow. If the sidebar of your theme is narrower than the width of the button image, then you may have to either adjust the image size, or the width of your sidebar column to make elements display correctly on your theme.

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

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

Extra Tips:

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

Adding And Configuring Widgets On The WordPress Sidebar Navigation Area

***

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

To continue, click this link:

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)