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 explained the basics of how to use WordPress widgets.

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

Configuring Widgets

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, filter content by publish dates, etc.

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

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

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

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

  • Add a clickable Contact Us graphic button linking visitors to the contact details page.
  • Add a Categories section.
  • Add a Recent Posts section to display the latest posts.
  • Adding a list of Pages.
  • Display Links on the sidebar.
  • Displaying a newsfeed with an RSS Feed section.
  • Adding a list of clickable tags through a Tag Cloud section.
  • Adding and configuring an Archives section to your sidebar area.

The Widgets panel is located inside your WP administration area and can easily be accessed from the WP administration menu by clicking on Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This opens the Widgets panel in your web browser …

Widgets Panel

(Widgets Screen)

Let’s start to configure some sidebar menu widgets …

Add A Text Widget To The Blog Sidebar Section

Text widgets are incredibly versatile …

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 lets you insert just about anything you want into your sidebar navigation area or other widget sections, such as lists of favorite items, maps and directions, special promotions and more to your site … just by typing in text or adding HTML into the content area. You can also give the widget a title. Remember to save your settings when done …

Text widgets are really versatile

(A text widget is versatile!)

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

For this example, let’s set up a support button on the sidebar that will take 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, create or source a graphic image that you will want your your visitors to click on …

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

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

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

Step 1 – Upload your image.

To display the image on your site, you must first upload the button image to your server’s images folder and note the path to your server’s image location.

For example …

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

This information will be required in Step 3.

For someone to go to your contact page when they click on the support button, 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 – Add a contact page.

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

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

Step 3 – Create the code for your text widget.

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

Your code can be typed into a simple text editor and should look something like this …

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

The image below shows which sections of the above code you need to replace with the actual contact details …

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

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, refer to this tutorial:

Now, go back into your Widgets panel …

Activate or deactivate widgets using drag & drop

(Widgets Area)

Step 4 – Add a Text widget.

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

In the Available Widgets area, select the Text widget …

Text widget

(Text widget)

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

Dragging and dropping your Text widget

(Drag-and-drop your WordPress text widget)

Step 5 – Configure your text widget settings.

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

WordPress text widget

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

WordPress text widget

Important

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

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

If you’re adding text without formatting tags, 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’re pasting in formatted HTML code like we’re using in the example for this tutorial).

Here is some text with Automatically add paragraphs option unchecked …

Automatically add paragraphs option not checked

(Automatically add paragraphs option unchecked)

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

Automatically add paragraphs option ticked

(Automatically add paragraphs option selected)

***

Step 6 – Refresh your browser.

After adding the text widget and HTML code, visit the front end of your site and refresh your 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 Help Button To Your Sidebar Navigation Menu

(Clickable button widget on sidebar)

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

Step 7 – Test your widget.

The last step is to ensure that your destination link works. Test your button to make sure that your visitors will go to your contact page when they click on the button. If you are taken to your contact page, then your text widget has been set up correctly …

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

(Test the clickable button)

Useful Tip

Useful Tips:

If you would like a new browser window to open up when visitors click on your support button (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 Area Using A Text Widget

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

Using A Text Widget To Add A Contact Button To Your Sidebar Menu - open in new window

When choosing images for your sidebar navigation menu, make sure that the width of your image doesn’t exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. As we’ve previously mentioned, some themes can display different column widths 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 need to either adjust the graphic size, or the column width to make images display correctly on your sidebar.

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

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

Extra Tips:

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

How To Add And Configure Widgets In The WordPress Sidebar

***

This is the end of part two of this series of tutorials.

To view Part 3, click here:

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com