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 WordPress Widgets In The Sidebar Navigation AreaIn Part One of this tutorial series, we explained the basics of using widgets in WordPress.

In this section you will begin configuring a number of sidebar widgets in WordPress.

Sidebar Widget Configuration

By default, your site comes with a number of preinstalled widgets, such as widgets for displaying links to your site’s pages, filter posts by categories, RSS feed content, filter content by tags, etc.

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

(In a default WordPress installation, your site comes with several built-in widgets)

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

In this step-by-step tutorial series, you will add, configure and reorder various WordPress widgets, including:

  • Add a clickable Help button linking visitors to your support page.
  • Add 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 main Pages.
  • Display important Links on your sidebar.
  • Displaying a newsfeed with an RSS Feed section.
  • Adding tags to the sidebar area through a Tag Cloud section.
  • Adding and configuring an Archives section to your sidebar.

The Widgets panel is located inside the WordPress dashboard and can be easily accessed by going to Appearance > Widgets …

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This loads the Widgets section in your browser …

Widgets Section

(Widgets Section)

Let’s configure WordPress text widgets …

Add A Text Widget To The Sidebar Navigation Menu

Text widgets are incredibly versatile …

Text widget

(WordPress Text widget)

Important 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)

A text widget can be used to add instructions, social media buttons, forms and more to your site … simply 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 …

Text widgets are extremely versatile

(A text widget is versatile!)

Example: Add A Contact Button To Your Sidebar Section Using A Text Widget

For this example, we’ll set up a help button on your sidebar section 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, you will need to create or source a graphic image that your visitors can click on …

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

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

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

Step 1 – Upload your image.

To display the clickable button image on your site, the image must be uploaded to your server. Upload your button image to your server and note the path to your image location.

E.g. …

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

This information will be required in Step 3.

For someone to go to the contact page when the support button gets clicked, you must either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will then link the button image to this URL in Step 3 …

Step 2 – Create your contact page.

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

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

Step 3 – Compose your text widget code.

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 image.

Your instructions can be typed in a simple text editor and should look something like this …

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

  • 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 code that you will need to replace with the actual contact page and image URLs …

Using A Text Widget To Add A Clickable Support Button To The Sidebar Menu

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, refer to 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, select 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 …

Dragging and dropping your Text widget

(Dragging and dropping your WordPress text widget)

Step 5 – Configure your 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 …

WordPress text widget

Add a title to the widget if you want (e.g. “Need Help?”, “Get Support”, etc.) and paste the code with the correct destination links into the Content area, then click the save button …

WordPress text widget

Important

Note: Remember to test your contact page and image URLs before pasting scripts into the Text Widget, or the clickable button will not work.

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

If 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 an HTML paragraph code (note: this is not necessary if you type in formatted content like we’re using in the example for this tutorial).

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

Automatically add paragraphs box not selected

(Automatically add paragraphs box not selected)

Here is some text with Automatically add paragraphs box checked …

Automatically add paragraphs box checked

(Automatically add paragraphs option selected)

***

Step 6 – Refresh the web browser.

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

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

(Clickable button widget on blog sidebar)

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

Step 7 – Test the widget.

The last step is to ensure that your clickable button works. Test your button to make sure that your visitors will go to the contact page when they click on the graphic image. You should be taken to your contact page …

Test your clickable button to make sure you've set up everything correctly

(Test the clickable button to make sure it works)

Practical Tip

Text Widgets – Useful Tips:

If you would like a new window to open up when visitors go to the support page (so they don’t leave the page they’re in), then change the code from this:

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

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

Using A Text Widget To Add A Support Button To The Sidebar Navigation Section - open in new window

When inserting images into your sidebar navigation 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. Note that some themes may display elements differently depending on their templates and their layout. Some sidebars may be too wide or too narrow. If your theme’s sidebar is narrower than the width of your graphic image, then you may need to either adjust the size of your images, or the width of your sidebar column to make the images display correctly on your sidebar section.

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

(Adjust column width or reduce image size)

Additional Tips:

  • If you don’t want to center the image inside the sidebar, delete the <center> and </center> tags from the beginning and end of the line of 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, forum, etc.) and change this anytime by editing the code in the text widget.

Adding WordPress Widgets To The Sidebar Navigation Area

***

This is the end of section 2 of this tutorial.

Click here to access Part 3:

***

"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com