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 WordPress Widgets To Your WebsiteIn Part One of this tutorial, we cover the basics of how to use widgets in WordPress.

In this section you are going to learn how to configure several WordPress sidebar widgets.

How To Configure Sidebar Widgets

In a default WordPress installation, your site comes with several preinstalled widgets that can be used out of the box with minimal to no configuration required, such as widgets that let you display links to your pages, filter posts by categories, newsfeeds, adding a search box, etc.

In a default WordPress installation, your site comes with several pre-installed widgets

(By default, your site comes with a number of preinstalled widgets)

How To Set Up Widgets On The Sidebar: Step-By-Step Tutorial

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

  • Adding a Contact Us button linking to your contact page.
  • Adding a Categories section with a drop down menu.
  • Add a Recent Posts section to display your latest posts.
  • Adding a list of the site’s main Pages.
  • Display a list of useful Links on your sidebar section.
  • Displaying the latest news using an RSS Feed section.
  • Add a Tag Cloud.
  • Configure how your Archived Posts display on the sidebar.

The Widgets screen is located inside your WP administration area and can easily be accessed by going to Appearance > Widgets …

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings you to the Widgets section in your browser …

Widgets Screen

(Widgets Area)

Let’s begin by configuring WordPress text widgets …

Adding Text Widgets To The Sidebar

Text widgets are versatile …

WordPress 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 notices, image links, forms and more to your site … simply by typing in text or adding HTML into the content area. You can also give the widget a title. Remember to save your settings …

Text widgets are very useful

(Text widgets are versatile!)

Example: Add A Clickable Contact Button To The Sidebar Navigation Area Using A Text Widget

For this example, let’s set up a clickable contact button on your 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 graphic image that visitors can click on …

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

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

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

Step 1 – Upload your image.

To display an image on your site, you must first upload the image to your server and note the path to your image location.

For example …

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

You will use this information in Step 3.

In order for someone to go to the contact page when they click on the help button, 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 – Add the destination page.

Create a contact page and note down its URL …

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

Step 3 – Create the code for your text widget.

Don’t worry … this sounds a lot more technical than it is. In simple terms, we just need to create the instructions linking the button image to your contact page/helpdesk.

Your code can be typed in a simple text editor and will look something like this …

Add A Clickable Help Button To Your Sidebar 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 screenshot below shows which sections of the above code you will need to replace with your actual web addresses …

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

Replace the above URLs and then copy all of your text file content to your clipboard when finished.

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

Next, go back into 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, find a Text widget …

WordPress text widget

(WordPress text widget)

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

Dragging and dropping your WordPress text widget

(Dragging and dropping your Text widget)

Step 5 – Configure your widget.

Click on the widget title bar to configure the widget 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 heading to the widget if you want (e.g. “Need Help?”, “Get Help”, etc.) and paste the code with the correct destination URLs into the large text box, then click the save button …

WordPress text widget

Important Info

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

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

If adding text with no 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 paste in HTML code like we’re doing in this tutorial).

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

Automatically add paragraphs option not ticked

(Automatically add paragraphs box not ticked)

Here is some text with Automatically add paragraphs option ticked …

Automatically add paragraphs box selected

(Automatically add paragraphs box selected)

***

Step 6 – Refresh the web browser.

Once you have added your text widget and HTML code, visit the front end of your site and refresh the web browser. If all links have been entered correctly, then your support button will display in the site’s sidebar menu …

Use A Text Widget To Add A Support Button To Your Sidebar Area

(Clickable support button widget on sidebar)

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

Step 7 – Test the button.

The last step is to ensure that the destination link works. Test this by clicking on the help button. You should be taken directly to your contact page …

Test your clickable button

(Test your text widget to ensure it works)

Practical Tip

Useful Tips:

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

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

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

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

When inserting images into your sidebar menu, 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 can display different column widths depending on their templates and layout. Some sidebars are wide and some are narrow. If your theme’s sidebar is narrower than the width of the graphic images, then you may have to either adjust the image size, or the column width to make graphics display correctly on your theme.

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 width of the sidebar column)

Extra Tips:

  • If you don’t want to center the button in the sidebar, delete the <center> and </center> tags from the beginning and end of the code. The image will then be aligned to its default settings (normally left-aligned).
  • Link your support button to any destination you want (e.g. to an external link, contact form, FAQ page, etc.) and change this anytime by replacing the content inside your text widget.

Adding And Configuring WordPress Widgets In The Website

***

This is the end of section two of this series of tutorials about how to use WordPress widgets.

Click here to continue reading:

***

"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