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 SidebarIn Part 1 of this tutorial, we cover the basics of using widgets in WordPress.

In this section you will learn how to begin configuring various WordPress sidebar widgets.

Configuring Widgets

In a default WordPress installation, your site comes with a number of built-in widgets, such as widgets for displaying external links, recent posts, RSS feed content, add tag clouds, etc.

In a default WordPress installation, your site comes with a number of built-in widgets

(By default, your site comes with a number of active widgets)

How To Add Sidebar Widgets In WordPress: Step-By-Step Tutorial

In this tutorial, you will add, configure and reorder various widgets, including:

  • Adding a clickable Support graphic linking to your contact details page.
  • Add a Categories section with a drop down menu.
  • Adding a Recent Posts section.
  • Adding a list of your site’s most important Pages.
  • Display useful Links on your sidebar.
  • Display news items using an RSS Feed section.
  • Add a Tag Cloud section.
  • Add and configure an Archives section to your sidebar area.

To access the Widgets area log into the WP dashboard and go to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This opens the Widgets area into your web browser …

Widgets Screen

(Widgets Screen)

Let’s start configuring some widgets …

Add A Text Widget To Your Blog Sidebar Area

Text widgets are incredibly useful …

Text widget

(WordPress Text widget)

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, maps and directions, news and updates 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 …

A text widget is really versatile

(A text widget is really versatile!)

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

For this example, let’s set up a clickable contact button on the sidebar navigation section 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 “help button” graphic image that your visitors can click on …

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

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

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

Step 1 – Upload your image.

Upload the graphic image to the images folder in your server and note the address of your server’s image location.

E.g. …

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

You will need this information in Step 3.

In order for visitors to be taken to your contact page when the support button is 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 – Create the contact page.

Create a contact page and note the page URL …

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

Step 3 – Create the code for your text widget.

Don’t worry … this sounds a lot more technical than it is. Basically, you just need to create the instructions for your clickable button.

Your instructions can be typed in a simple text file and should look something like this …

Add A Help Button To Your Sidebar Section 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 code you need to replace with the actual contact page and image URLs …

Add A Support Button To The Sidebar Menu 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:

Next, go back into your Widgets panel …

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

In the Available Widgets area, select a Text widget …

WordPress text widget

(Text widget)

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

Drag-and-drop your Text widget

(Drag and drop your Text widget)

Step 5 – Configure your 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 the text widget content area and click save …

Text widget

Add a title section to your widget if you want (e.g. “Need Help?”, “Get Help”, etc.) and paste the code with the correct destination URLs into the large text box, then click the save button …

WordPress text widget

Important Info

Note: Remember to test your contact page and button image URLs before pasting scripts into your Text Widget, or your clickable button will not work.

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

If you’re 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: not required if you’re pasting in formatted HTML content 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 unchecked

(Automatically add paragraphs option unchecked)

Here is some text with Automatically add paragraphs option ticked …

Automatically add paragraphs option selected

(Automatically add paragraphs option selected)

***

Step 6 – Refresh your browser.

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

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

(Clickable support button widget on blog sidebar)

The screenshot above shows the button added to a newly-installed WordPress site.

Step 7 – Test the button.

The last step is to make sure that the links work. Test the button to make sure that visitors will go to your support page when they click on the button. If you are taken directly to the support page, then your text widget has been set up correctly …

Test your clickable button to make sure it works

(Test the text widget)

Tip

Useful Tips:

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

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

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

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

When adding images to your sidebar navigation menu, make sure that the width of the image doesn’t exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. As mentioned earlier, some themes may display different column widths 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 button image, then you may need to either adjust the size of your images, or the column width to make images display correctly on your theme.

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

(Adjust column width or reduce image size)

More Tips:

  • If you don’t want the button image to be centered inside the 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 your help 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 the text widget.

How To Add And Configure WordPress Widgets In Your Sidebar

***

This is the end of part 2 of this tutorial series.

Click here to continue reading:

***

"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)