How To Use And Configure WordPress Widgets – Part 2

Learn how to add, configure, and use text widgets on your WordPress sidebar …

Using WidgetsIn Part 1 of this tutorial series, we cover the basics of using widgets in WordPress.

In this tutorial you will configure various WordPress widgets.

Widget Configuration

In a default WordPress installation, your site comes with a number of preinstalled 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, news items, adding search features, etc.

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

(In a default WordPress installation, your site comes with several pre-installed widgets)

How To Add And Configure Widgets On Your Sidebar Section: Tutorial

In this tutorial series, you are going to learn how to add, configure and reorder various WordPress widgets to display in the site’s sidebar, including:

  • Add a Help graphic linking visitors to your support page.
  • Adding a Categories section with a drop down menu.
  • Add a Recent Posts section.
  • Adding a list of Pages.
  • Display important Links on your sidebar navigation menu.
  • Displaying the latest news with an RSS Feed section.
  • Add a list of clickable tags with a Tag Cloud.
  • Add and configure an Archives section to the sidebar section.

The Widgets panel is located in the WP administration area and can easily be accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets panel in your web browser …

Widgets Screen

(Widgets Section)

Let’s get started …

Add A Text Widget To Your Sidebar Navigation Menu

Text widgets are quite useful …

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 let you insert just about anything you want into your sidebar or other widget sections, such as events, image links, special promotions and more to your site … simply by typing in text or adding HTML into the content area. You can also add an optional title in the Title field. Remember to save your settings …

A text widget is extremely versatile

(A text widget is versatile!)

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

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

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

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

Use A Text Widget To Add A Clickable Help Button To The Sidebar Area

Step 1 – Upload your image.

To display an image on your site, the graphic image must be uploaded to your server. Upload your button image to the images folder in your server and note the address of your image location.

For example …

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

You will use this information in Step 3.

For visitors to be taken to your contact page when the help button gets 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 then link your button image to this URL in Step 3

Step 2 – Add your destination page.

Create a contact page and note its URL …

Use A Text Widget To Add A Support Button To The Sidebar Navigation Area

Step 3 – Create your text widget code.

If you’re not a technical-minded person, 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 your contact page/helpdesk.

Your code can be typed into a plain text file and will look something like this …

Use A Text Widget To Add A Clickable Support Button To The 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 code that you will need to replace with the actual contact details …

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

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

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

Now, go back to your Widgets screen …

Activate or deactivate widgets using drag & drop

(Widgets Screen)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar in the location where the clickable button should display.

In the Available Widgets area, select a Text widget …

Text widget

(Text widget)

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

Drag and drop your WordPress text widget

(Dragging and dropping your Text widget)

Step 5 – Configure the widget settings.

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 the text widget content area and click save …

WordPress text widget

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

WordPress text widget

Important Info

Note: Make sure to check your contact page and image links before pasting scripts into the Text Widget, or the clickable button will not work.

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

If you’re adding text without formatting tags like paragraph breaks, you may want to tick the Automatically add paragraphs box to wrap each block of text in paragraphs (note: this is not necessary if you type in formatted HTML code like we’re doing in this tutorial).

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

Automatically add paragraphs option not checked

(Automatically add paragraphs box unchecked)

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

Automatically add paragraphs option ticked

(Automatically add paragraphs box checked)

***

Step 6 – Refresh the web browser.

After adding your text widget and formatted content, go to your site and refresh your web browser. If all links have been entered correctly, then the clickable support button should display in your site’s sidebar menu …

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

(Clickable support button widget on blog sidebar)

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

Step 7 – Test the widget.

The last step is to make sure that your links work. Test your button to make sure that your visitors will go to the contact page when they click on the button. You should be taken directly to the contact page …

Test your clickable button

(Test your clickable button to make sure you’ve set up everything correctly)

Tip

Useful Tips:

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

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

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

Using A Text Widget To Add A Support Button To Your Sidebar Menu - open in new window

When choosing images for your sidebar area, make sure that the width of the image doesn’t exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. Note that some themes can display different column widths depending on their templates and their layout. Some sidebars may be too wide or too narrow. If the sidebar of your theme is narrower than the width of the graphic image, then you may have to either adjust the graphic size, or the column width to make images display correctly on your sidebar.

Adjust column width or reduce image size

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

Additional Tips:

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

How To Add WordPress Widgets To The Sidebar Navigation Section

***

This is the end of part two of this tutorial.

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

***

"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum