How To Use And Configure WordPress Widgets – Part 2

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

Adding And Configuring WordPress Widgets In The BlogIn Part 1 of this step-by-step tutorial series, we explained the basics of using widgets in WordPress.

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

Configuring Sidebar Widgets

By default, your site comes with several built-in widgets that can be used out of the box with minimal to no configuration needed, such as widgets that let you display links to your site’s pages, recent posts, text or HTML banners, add content search features, etc.

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

(In a default WordPress installation, your site comes with a number of preinstalled widgets)

How To Set Up Sidebar Widgets: Tutorial

In this tutorial, we are going to add, configure and reorder a number of commonly-used widgets, including:

  • Add a clickable Support graphic linking to your help page.
  • Add a Categories section.
  • Add a Recent Posts section.
  • Adding a list of Pages.
  • Display important Links on your sidebar menu.
  • Add an RSS Feed section.
  • Adding a Tag Cloud.
  • Add and configure an Archives section to the sidebar navigation area.

The Widgets panel is located in the WP administration area and can be accessed from the dashboard menu by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets area in your browser window …

Widgets Section

(Widgets Screen)

Let’s get started …

Adding Text Widgets To Your Sidebar

Text widgets are quite useful …

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 can be used to add article snippets, maps and directions, reviews and more to your site … simply by typing in text or adding HTML into the widget content area. You can also add an optional title in the Title field. Remember to save your settings …

Text widgets are really useful

(Text widgets are really useful!)

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

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, you will need to create or source a graphic image that you will want your visitors to click on …

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

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

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

Step 1 – Upload your image.

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

E.g. …

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

You will need this information in Step 3.

In order for visitors to go to your contact page when the graphic button is clicked, 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 your destination page.

Create a contact page and note its URL …

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

Step 3 – Create your text widget code.

If you’re not a technical-minded person, 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 button.

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

Add A Support Button To Your Sidebar Menu 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 with the URL of your image location.

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

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

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

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

Now, go back to your Widgets screen …

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, select a Text widget …

WordPress text widget

(WordPress 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 WordPress text widget

(Drag-and-drop your WordPress text widget)

Step 5 – Configure your text widget.

Click on the 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 …

Text widget

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

WordPress text widget

Important Info

Note: Make sure to check all links before pasting scripts into the Text Widget, or your button will not work.

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

If 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 paragraphs (note: this is not necessary if you’re typing in formatted HTML content like we’re doing in this tutorial).

Here is some text with Automatically add paragraphs box unchecked …

Automatically add paragraphs option unchecked

(Automatically add paragraphs box not checked)

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

Automatically add paragraphs option checked

(Automatically add paragraphs option ticked)

***

Step 6 – Refresh your browser.

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

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

(Clickable button widget on sidebar)

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

Step 7 – Test the widget.

The final step is to make sure that the links work. Test this by clicking the support button. If you are taken directly to your contact page, then your text widget has been set up correctly …

Test the text widget to make sure it works

(Test the clickable button to ensure it works)

Practical Tip

Tips:

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

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

To this (i.e. include the section containing target=”_blank” in your code):

Add A Contact Button To Your Sidebar Area Using A Text Widget - 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 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 graphic image, then you may have to either adjust the size of your images, or the width of your sidebar column to make graphics display correctly on your theme.

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

(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 your button image inside your sidebar, delete the <center> and </center> tags from the beginning and end of the HTML code. The image will then align to the left.
  • Link your contact button to any destination you like (e.g. to an external link, contact form, FAQ page, etc.) and change this anytime by replacing the links inside your widget.

How To Add WordPress Widgets To The Sidebar Navigation Section

***

This is the end of section two of this tutorial.

To view Part Three, 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