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 Your Sidebar SectionIn Part 1 of this step-by-step tutorial series, we cover the basics of using WordPress widgets.

In this tutorial you will learn how to begin configuring several widgets in WordPress.

Configuring Widgets

In a default WordPress installation, your site comes with a number of preinstalled active widgets, such as widgets that let you display links to your site’s pages, filter posts by categories, newsfeeds, filter content by publish dates, etc.

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

(By default, your site comes with a number of pre-installed widgets)

Adding And Configuring Frequently-Used WordPress Sidebar Widgets: Tutorial

In this tutorial, you will add, configure and reorder s number of WordPress widgets to display in the site’s sidebar, including:

  • Adding a Contact Us graphic button linking to your contact page.
  • Adding a Categories section with a drop down menu.
  • Adding a Recent Posts section to display your latest posts.
  • Adding a list of the site’s main Pages.
  • Display a list of useful Links on your sidebar navigation menu.
  • Display news items using an RSS Feed section.
  • Adding a list of clickable tags through a Tag Cloud.
  • Adding and configuring an Archives section to your sidebar.

The Widgets area can be accessed inside the WordPress administration by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets panel in your browser …

Widgets Area

(Widgets Section)

Let’s begin by learning how to configure text widgets …

Adding Text Widgets

Text widgets are versatile …

Text widget

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

Text widgets can be used to add notices, images, scripts and more to your site … simply by typing in text or pasting 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 very useful

(A text widget is really useful!)

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

For this example, let’s set up a clickable help button on the sidebar navigation 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, 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 Clickable Help Button To Your Sidebar Area

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

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

Step 1 – Upload your image.

Upload the button image to your server and write down the address of your server’s image location.

For example …

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

You will need this information in Step 3.

In order for someone to be taken to the contact page when the support button is clicked, you will need to either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link your button graphic to this URL in Step 3

Step 2 – Create the destination page.

Create a contact page and note the page URL …

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

Step 3 – Compose the HTML 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 code can be typed into a simple text file and will look something like this …

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

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

The screenshot below shows the sections of the above sample code that you will need to replace with your actual contact page and image URLs …

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

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

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

Now, 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 in the location where your button should display.

In the Available Widgets area, find a Text widget …

WordPress text widget

(Text widget)

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

Dragging and dropping your Text widget

(Drag-and-drop your Text widget)

Step 5 – Configure your widget.

Click on the widget title bar to configure the widget settings. Paste the code with the URLs to your contact page and graphic button into your text widget content area and click save …

WordPress text widget

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

Text widget

Important Info

Note: Make sure to test your contact page and button image URLs before pasting scripts into your Text Widget, or the 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 an HTML paragraph code (note: this is not necessary if you’re pasting in code 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 unchecked)

Here is some text with Automatically add paragraphs option checked …

Automatically add paragraphs option selected

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh your web browser.

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

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

(Clickable button widget on blog sidebar)

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

Step 7 – Test your widget.

The last step is to ensure that the links work. Test this by clicking on the help button. You should be taken to the support page …

Test the clickable button

(Test the text widget to make sure you’ve set up everything correctly)

Tip

Useful Tips:

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

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

To this (i.e. add the section that says: target=”_blank” in your code):

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

When inserting images into your sidebar navigation area, 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 different column widths depending on their templates and layout. Some sidebars are wide and some are narrow. If your theme’s sidebar width is narrower than the width of your graphic images, then you may need to either adjust the graphic size, or the column width to make images display correctly on your sidebar.

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

(Adjust column width or reduce image size)

Additional Tips:

  • If you don’t want to center the image in the 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).
  • You can link your contact button to any URL you want (e.g. to an external link, helpdesk, support forum, etc.) and change this anytime by editing the content inside your widget.

How To Add WordPress Widgets To The Website

***

This is the end of section 2 of this tutorial.

To view the rest of this tutorial series, click this link:

***

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