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 SidebarIn Part One of this tutorial series, we explained the basics of how to use widgets in WordPress.

In this tutorial you are going to configure a number of widgets in WordPress.

Configuring Sidebar Widgets

By default, your site comes with several built-in active widgets, such as widgets that let you display external links, filter posts by categories, RSS feed content, add a search box, etc.

In a default WordPress installation, your site comes with several preinstalled widgets

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

How To Configure Commonly-Used Widgets On The Sidebar Menu: Tutorial

In this step-by-step tutorial, we are going to add, configure and reorder a number of frequently-used widgets to display in your site’s sidebar, including:

  • Add a clickable Support Contact graphic linking to your contact page.
  • Add a Categories section with a drop down menu.
  • Add a Recent Posts section.
  • Adding a list of your site’s Pages.
  • Display useful Links on the sidebar area.
  • Displaying news items with an RSS Feed section.
  • Add tag links with a Tag Cloud section.
  • Adding and configuring an Archives section to the sidebar.

To access the Widgets area go to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets panel in your web browser …

Widgets Section

(Widgets Screen)

Let’s start by learning how to configure text widgets …

Text Widgets

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)

Text widgets let you insert just about anything you want into your sidebar or other widget sections, such as policies, videos, special promotions and more to your site … simply by typing in text or pasting HTML into the widget content area. You can also add an optional title in the Title field. Remember to save your settings when done …

A text widget is really versatile

(Text widgets are very useful!)

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

For this example, let’s set up a clickable support button on your sidebar 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 graphic image that you will use on your own site …

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

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

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

Step 1 – Upload your image.

To display the clickable button image on your site, you must first upload the image to your server and note the address of your image location.

For example …

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

This information will be used in Step 3.

For someone to be taken to your contact page when they click on the graphic button, either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will then link the button graphic to this URL in Step 3

Step 2 – Add a support page.

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

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

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 linking the graphic image to your contact page.

Your instructions can be typed into a plain text editor and will look something like this …

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

  • 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 the sections of the above sample code that you need to replace with the actual contact details …

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

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

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

Go back to your Widgets section …

Activate or deactivate widgets using drag and drop

(Widgets Screen)

Step 4 – Add a Text widget.

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

In the Available Widgets area, select the Text widget …

WordPress text widget

(WordPress text widget)

Drag your Text widget to the Active Widgets section and release it 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 widget.

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

Text widget

Add a heading to your widget if you want (e.g. “Need Help?”, “Support”, etc.) and paste the code with the correct destination links into the text area, then click Save when done …

Text widget

Info

Note: Make sure to test your contact page and image URLs before pasting scripts into the Text Widget, or your clickable button won’t 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: not required if you’re typing in formatted HTML code like we’re using in the example for this tutorial).

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

Automatically add paragraphs box not checked

(Automatically add paragraphs option not ticked)

Here is some text with Automatically add paragraphs option ticked …

Automatically add paragraphs option checked

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh your web browser.

Once you have added your widget and content, go to your site and refresh your browser. If all links have been entered correctly, then your clickable support button should display at the top of your sidebar menu …

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

(Clickable support button widget on blog sidebar)

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

Step 7 – Test the widget.

The final step is to make sure that your destination URL works. Test your button to make sure that your visitors will go to the contact page when clicking the graphic image. You should be taken to your contact page …

Test your clickable button

(Test your text widget)

Practical Tip

Useful Tips:

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

Use A Text Widget To Add A Clickable Support Button To The Sidebar Navigation Menu

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

Using A Text Widget To Add A Clickable Help Button To The Sidebar Menu - open in new window

When choosing images for your sidebar menu, make sure that the width of the 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 different column widths depending on their templates and layout. Some sidebars may be wider or narrower. 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 images display correctly on your sidebar.

Adjust column width or reduce image size

(Make sure that 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 image inside your sidebar, delete the <center> and </center> tags from the beginning and end of the code. The image will then align to the left.
  • 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 replacing the content in the text widget.

How To Add WordPress Widgets To The Site

***

This is the end of section 2 of this series of tutorials on how to use WordPress widgets.

To keep reading, click this link:

***

"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