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 BlogIn Part 1 of this step-by-step tutorial series, we cover the basics of how to use widgets in WordPress.

In this section you are going to begin configuring a number of frequently-used WordPress sidebar widgets.

How To Configure Widgets

In a default WordPress installation, your site comes with several preinstalled widgets, such as widgets for displaying links to your site’s pages, recent posts, news items, adding 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 several built-in widgets)

Setting Up Sidebar Widgets: Tutorial

In this step-by-step tutorial series, you will add, configure and reorder a number of commonly-used WordPress widgets, including:

  • Add a Help graphic linking to your contact page.
  • Add a Categories section.
  • Adding a Recent Posts section.
  • Adding a list of the site’s main Pages.
  • Display important Links on your sidebar navigation menu.
  • Add an RSS Feed section.
  • Adding a Tag Cloud section.
  • Add and configure an Archives section to the sidebar menu.

The Widgets area is located inside the administration area by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets screen in your browser …

Widgets Area

(Widgets Screen)

Let’s get started …

Text Widgets

Text widgets are quite useful …

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)

Text widgets can be used to add policies, maps and directions, scripts and more to your site … just type in text or add HTML into the content area. You can also add an optional title in the Title field. Remember to save your settings when done …

Text widgets are really versatile

(Text widgets are very useful!)

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

For this example, we’ll set up a clickable help button on your sidebar menu that takes your 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 visitors can click on …

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

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

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

Step 1 – Upload your image.

To display the image on your site, the image must be uploaded to your server. Upload the image to a folder on your server and note the URL pointing to your image location.

E.g. …

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

This information will be required in Step 3.

For someone to be taken to your contact page when the help button is clicked, you must 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 – Create a contact page.

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

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

Step 3 – Create your text widget code.

Don’t worry … this sounds a lot more technical than it is. Basically, you just need to create the instructions linking the button image to the destination URL.

Your code can be typed into a plain text editor and should look something like this …

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

  • 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 with the URL of your image location.

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

Add A Clickable Contact Button To Your Sidebar 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 with basic HTML code, see this tutorial:

Next, go back into your Widgets panel …

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 your clickable button to display.

In the Available Widgets area, find a Text widget …

WordPress text widget

(Text widget)

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

Dragging and dropping 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 settings. 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 title 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 the save button …

WordPress text widget

Info

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

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

Automatically add paragraphs option not selected

(Automatically add paragraphs box not checked)

Here is some text with Automatically add paragraphs box selected …

Automatically add paragraphs box selected

(Automatically add paragraphs box checked)

***

Step 6 – Refresh your web browser.

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

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

(Clickable support button widget on blog sidebar)

The above screenshot shows ’click for help’ button in the sidebar of a brand new WordPress site.

Step 7 – Test the widget.

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

Test the clickable button

(Test your clickable button)

Tip

Text Widgets – Useful Tips:

If you would like your support page to open in a new window when visitors click on the support (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 Contact Button To Your Sidebar Area

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

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

When choosing images for your sidebar section, make sure that the width of your image does not exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. As mentioned earlier, some themes may display elements differently depending on their templates and their layout. Some sidebars may be too wide or too narrow. If your theme’s sidebar is narrower than the width of the 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.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

Extra Tips:

  • If you don’t want your button image to be centered inside your sidebar, delete the <center> and </center> tags from the beginning and end of the HTML 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, helpdesk, FAQ page, etc.) and change this anytime by editing the links in your text widget.

How To Add And Configure Widgets On Your WordPress Blog Sidebar Navigation Menu

***

This is the end of part two of this tutorial series about how to use WordPress widgets.

Click on this link to access the rest of this tutorial series:

***

"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