How To Use And Configure WordPress Widgets – Part 2

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

For a white label version of this tutorial visit WPTrainingManual.com.

How To Add And Configure WordPress Widgets In The SidebarIn Part One of this step-by-step tutorial, we explained the basics of how to use widgets in WordPress.

In this section you will learn how to configure several sidebar widgets in WordPress.

Configuring Sidebar Widgets

In a default WordPress installation, your site comes with several pre-installed active widgets, such as widgets that let you display links to your pages, recent posts, text or HTML banners, adding a search box, etc.

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

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

How To Add And Configure Frequently-Used WordPress Widgets On The WordPress Sidebar Navigation Area: Tutorial

In this step-by-step tutorial series, you are going to add, configure and reorder various commonly-used WordPress widgets to display in the site’s sidebar, including:

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

The Widgets section is located inside the WP dashboard and can easily be accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

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

Widgets Screen

(Widgets Screen)

Let’s start configuring your sidebar widgets …

Adding Text Widgets

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)

Text widgets let you insert just about anything you want into your sidebar or other widget sections, such as lists, maps and directions, scripts 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 extremely versatile

(A text widget is really useful!)

Example: Use A Text Widget To Add A Clickable Help Button To Your Sidebar Menu

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

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

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 Help Button To The Sidebar Navigation Area

Step 1 – Upload your image.

To display an image on your site, first you must upload the 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

This information will be required in Step 3.

In order for visitors 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 then link your button graphic to this URL in Step 3

Step 2 – Add the support page.

Create a contact page and note its URL …

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

Step 3 – Compose your text widget code.

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

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

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

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

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

Replace the above URLs and then copy all of 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 area …

Activate or deactivate widgets using drag-and-drop

(Widgets Area)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar in the location where the support button should display.

In the Available Widgets area, find the Text widget …

Text widget

(Text widget)

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

Drag-and-drop your Text widget

(Drag and drop your WordPress text widget)

Step 5 – Configure the text widget settings.

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 the save button …

WordPress text widget

Add a title section to the 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 Save when done …

WordPress text widget

Important

Note: Remember to check all URLs before pasting scripts into the Text Widget, or the 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 an HTML paragraph code (note: not required if you’re typing in code like we’re doing in this tutorial).

Here is some text with Automatically add paragraphs option not ticked …

Automatically add paragraphs box not checked

(Automatically add paragraphs box not checked)

Here is some text with Automatically add paragraphs option ticked …

Automatically add paragraphs box selected

(Automatically add paragraphs box selected)

***

Step 6 – Refresh your browser.

Once you have added the text widget and formatted content, go to the front-end of your site and refresh the browser. If you have entered all of the links correctly, then your support button will display at the top of the site’s sidebar menu …

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

(Clickable support button widget on blog sidebar)

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

Step 7 – Test your button.

The last step is to ensure that the destination link works. Test this by clicking the button. If you are taken directly to the support page, then your text widget has been set up correctly …

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

(Test your text widget to ensure you’ve set up everything correctly)

Tip

Useful Tips:

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

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

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

Use A Text Widget To Add A Clickable Support Button To The Sidebar Navigation Section - 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. As mentioned earlier, some themes can display elements differently 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 your button images, then you may need to either adjust the size of your images, or the column width to make images display correctly on your sidebar section.

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

(Adjust column width or reduce image size)

More 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 be left-aligned.
  • You can link your contact button to any URL you want (e.g. to an external site, helpdesk, FAQ page, etc.) and change this anytime by editing the content in your text widget.

How To Add And Configure Widgets In WordPress

***

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

Click on this link to view Part Three:

***

"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

For a white label version of this tutorial visit WPTrainingManual.com.
Originally published as How To Use And Configure WordPress Widgets – Part 2.