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 Widgets In The WordPress Sidebar SectionIn Part One of this tutorial series, we explained the basics of using widgets in WordPress.

In this tutorial you will begin configuring a number of WordPress sidebar widgets.

Sidebar Widget Configuration

In a default WordPress installation, your site comes with several built-in widgets that can be used out of the box with minimal to no configuration required, such as widgets that let you display links to your pages, recent posts, text or HTML banners, add tag clouds, 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 Set Up Widgets On Your WordPress Sidebar: Tutorial

In this step-by-step tutorial, you will add, configure and reorder various frequently-used WordPress widgets, including:

  • Adding a clickable Help image linking visitors to the contact page.
  • Adding a Categories section with a drop down menu.
  • Adding a Recent Posts section.
  • Add a list of Pages.
  • Display important Links on your sidebar.
  • Display newsfeeds with an RSS Feed section.
  • Adding a list of clickable tags through a Tag Cloud.
  • Configure how Archived Posts display on your sidebar.

To use widgets, access the Widgets area located inside the admin by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets screen in your browser …

Widgets Section

(Widgets Section)

Let’s begin configuring some widgets …

Adding Text Widgets To Your Sidebar Section

Text widgets are versatile …

WordPress 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 lets you insert just about anything you want into your sidebar navigation section or other widget sections, such as notices, videos, scripts and more to your site … just type in text or insert HTML into the widget content area. You can also give the widget a title. Remember to save your settings …

Text widgets are versatile

(Text widgets are versatile!)

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

For this example, let’s set up a contact button on your sidebar that will take 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, you will need to create or source a graphic image that visitors can click on …

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

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

Using A Text Widget To Add A Clickable Support Button To Your Sidebar Section

Step 1 – Upload your image.

Upload the button image to your server and note down the path 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 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 your button graphic to this URL in Step 3

Step 2 – Add a destination page.

Create a contact page and note its URL …

Add A Support Button To Your 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. Basically, you just need to create the instructions linking your graphic image to the destination URL.

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

Use A Text Widget To Add A Help Button To The Sidebar Menu

  • 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 sample code you need to replace with your actual contact page and image URLs …

Add A Help Button To The Sidebar Area 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 figuring out basic HTML code, see this tutorial:

Now, go back to your Widgets screen …

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

In the Available Widgets area, select a Text widget …

Text widget

(Text widget)

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

Drag and drop your Text widget

(Dragging and dropping your Text widget)

Step 5 – Configure the widget.

Click on the widget title bar to configure its options. Paste the code with the links 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?”, “Get Support”, etc.) and paste the code with the correct destination links into the Content area, then click Save when done …

WordPress text widget

Important

Note: Remember to test all URLs before pasting scripts into the Text Widget, or your clickable button won’t work.

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

If adding text without formatting tags, you may want to tick the Automatically add paragraphs box to wrap each block of text in paragraphs (note: not required if you’re typing in HTML content like we’re doing in this tutorial).

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

Automatically add paragraphs option not checked

(Automatically add paragraphs option not ticked)

Here is some text added to a Text widget with Automatically add paragraphs box checked …

Automatically add paragraphs box ticked

(Automatically add paragraphs option ticked)

***

Step 6 – Refresh the web browser.

After adding the text widget and code, visit the front-end of your site and refresh your web browser. If you have entered all of the links correctly, then the support button will display in the sidebar menu …

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

(Clickable support button widget on sidebar)

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

Step 7 – Test your widget.

The last step is to make sure that the clickable button works. Test the button to make sure that your visitors will go to the contact page when clicking the button. If you are taken directly to your contact page, then the text widget has been set up correctly …

Test the text widget

(Test the text widget)

Useful Tip

Tips:

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

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

To this (i.e. insert the section that says: target=”_blank” in the text widget code):

Add A Contact Button To Your Sidebar Area Using A Text Widget - open in new window

When choosing images to add to your sidebar area, 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 we’ve previously mentioned, some themes may display elements differently depending on their templates and layout. Some sidebars may be too wide or too narrow. 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 graphics display correctly on your sidebar area.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

Extra Tips:

  • If you don’t want your image to be centered inside your 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 the support button to any URL you want (e.g. to an external link, helpdesk, FAQ page, etc.) and change this anytime by editing the content inside the text widget.

How To Add And Configure WordPress Widgets In The Site

***

This is the end of section two of this series of tutorials on how to use Widgets.

Click on this link to continue:

***

"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)