How To Use And Configure WordPress Widgets – Part 2

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

Adding WordPress Widgets To Your BlogIn Part 1 of this step-by-step tutorial series, we explained the basics of using widgets in WordPress.

In this section we are going to show you how to configure various commonly-used sidebar widgets in WordPress.

Configuring Commonly-Used WordPress Widgets

In a default WordPress installation, your site comes with several preinstalled widgets that can be used out of the box with little to no configuration required, such as widgets that let you display external links, recent posts, news items, add search features, etc.

By default, your site comes with several preinstalled widgets

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

Setting Up Sidebar Widgets: Tutorial

In this step-by-step tutorial series, you will add, configure and reorder various commonly-used WordPress widgets to display in the site’s sidebar, including:

  • Adding a Help image linking to your help page.
  • Adding a Categories section with a drop down menu.
  • Add a Recent Posts section to display the latest posts.
  • Add a list of the site’s Pages.
  • Display important Links on your sidebar.
  • Adding an RSS Feed section.
  • Adding a Tag Cloud section.
  • Configure how your Archived Posts display on your sidebar.

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

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets section in your web browser …

Widgets Screen

(Widgets Section)

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

Add A Text Widget

Text widgets are quite useful …

Text widget

(WordPress Text widget)

Useful 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 or other widget sections, such as lists, ads, scripts and more to your site … just type in text or paste HTML into the widget content area. You can also add an optional title in the Title field. Remember to save your settings when done …

A text widget is very useful

(Text widgets are very useful!)

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

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

Add A Contact Button To Your Sidebar Navigation Section 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 …

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

Step 1 – Upload your image.

Upload the button image to a folder on your server and note the address of your server’s image location.

E.g. …

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

You will use this information in Step 3.

In order for visitors to be taken to your contact page when they click on the help button, 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 – Add a support page.

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

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

Step 3 – Compose 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 image.

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

Use A Text Widget To Add A Clickable Support 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 with the URL of your image location.

The image below shows the sections of the above code that you will need to replace with your actual web addresses …

Using A Text Widget To Add A Help Button To The Sidebar Navigation Section

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 to your Widgets section …

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

In the Available Widgets area, select a Text widget …

WordPress text widget

(WordPress text widget)

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

Dragging and dropping your WordPress text widget

(Dragging and dropping your Text widget)

Step 5 – Configure the text widget settings.

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

Text widget

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

WordPress text widget

Important Info

Note: Make sure to test your contact page and image URLs 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 with no formatting tags, 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’re pasting in code like we’re using in the example for this tutorial).

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

Automatically add paragraphs option unchecked

(Automatically add paragraphs option not ticked)

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

Automatically add paragraphs box checked

(Automatically add paragraphs box selected)

***

Step 6 – Refresh the browser.

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

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

(Clickable button widget on sidebar)

The screenshot above shows the support contact button in the sidebar of a brand new WordPress site.

Step 7 – Test your button.

The final step is to make sure that your destination link works. Test your button to make sure that your visitors will go to your support page when they click on the button. You should be taken directly to the contact page …

Test the clickable button to ensure it works

(Test the clickable button)

Tip

Text Widgets – Useful Tips:

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

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

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

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

When choosing images for 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. Note that some themes can display different column widths 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 images, then you may need to either adjust the size of your images, or the column width to make graphics display correctly on your sidebar section.

Adjust column width or reduce image size

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

More Tips:

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

How To Add WordPress Widgets To Your Blog Sidebar Menu

***

This is the end of part two of this series of tutorials about using WordPress widgets.

To view Part 3, click here:

***

"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum