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 Widgets On The Sidebar AreaIn Part 1 of this tutorial series, we explained the basics of using WordPress widgets.

In this tutorial you will learn how to configure various widgets in WordPress.

How To Configure Sidebar Widgets

In a default WordPress installation, your site comes with a number of built-in widgets that can be used out of the box with little to no configuration required, such as widgets that let you display links to your pages, recent posts, RSS feed content, adding site search features, etc.

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

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

How To Set Up Widgets On Your WordPress Sidebar: Tutorial

In this tutorial, you are going to add, configure and reorder a number of frequently-used WordPress widgets, including:

  • Add a clickable Contact Us graphic linking visitors to your contact page.
  • Add a Categories section with a drop down menu.
  • Adding a Recent Posts section.
  • Add a list of the site’s main Pages.
  • Display a list of useful Links on the sidebar.
  • Add an RSS Feed section.
  • Add a list of clickable tags with a Tag Cloud section.
  • Add and configure an Archives section to the sidebar.

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

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets section in your web browser …

Widgets Screen

(Widgets Section)

Let’s get started …

Text Widgets

Text widgets are incredibly versatile …

Text widget

(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 article snippets, videos, scripts and more to your site … simply type in text or insert 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 useful

(A text widget is extremely versatile!)

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

For this example, we’ll set up a clickable contact button on the sidebar section 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 “help button” graphic image that you will want your visitors to click on …

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

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

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

Step 1 – Upload your image.

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

For example …

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

This information will be used in Step 3.

In order for visitors to go to the contact page when the support button gets clicked, 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 the support page.

Create a contact page and note the page URL …

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

Step 3 – Compose your text widget code.

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

Your instructions can be typed in a plain text editor and should look something like this …

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

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

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

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

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

Go back into your Widgets area …

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 would like the button to display.

In the Available Widgets area, find the Text widget …

Text widget

(WordPress text widget)

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

Drag and drop your WordPress text widget

(Drag and drop your Text widget)

Step 5 – Configure your widget settings.

Click on the Text widget title bar to configure its options. 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 your widget if you want (e.g. “Need Help?”, “Support”, etc.) and paste the code with the correct destination URLs into the large text box, then click Save when done …

Text widget

Info

Note: Remember to check your contact page and image links 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 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’re pasting in formatted content like we’re doing in this tutorial).

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

Automatically add paragraphs option not ticked

(Automatically add paragraphs box not ticked)

Here is some text with Automatically add paragraphs box selected …

Automatically add paragraphs option selected

(Automatically add paragraphs option checked)

***

Step 6 – Refresh the browser.

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

Add A Support Button To Your Sidebar Navigation Area Using A Text Widget

(Clickable support button widget on blog sidebar)

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

Step 7 – Test the widget.

The last step is to make sure that the destination URL works. Test this by clicking on the graphic button. If you are taken to the support page, then the text widget has been set up correctly …

Test your clickable button

(Test the text widget)

Useful Tip

Tips:

If you want a new window to open up when visitors click on your support 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 Contact Button To The Sidebar Navigation Area

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

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

When adding images to your sidebar navigation 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. As we’ve previously explained, some themes can display elements differently depending on their templates and their layout. Some sidebars may be too wide or too narrow. If your theme’s sidebar width is narrower than the width of the graphic image, then you may have to either adjust the size of your images, or the column width to make the images display correctly on your sidebar.

Adjust column width or reduce image size

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

More 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 the support button to any destination you like (e.g. to an external link, helpdesk, support forum, etc.) and change this anytime by editing the code inside your widget.

How To Add WordPress Widgets To The Sidebar Navigation Area

***

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

To keep reading, click here:

***

"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group