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, we explained the basics of how to use WordPress widgets.

In this section you will learn how to configure several sidebar widgets in WordPress.

Configuring Frequently-Used WordPress Sidebar Widgets

By default, your site comes with a number of pre-installed widgets that can be used out of the box with minimal to no configuration needed, such as widgets for displaying external links, filter posts by categories, RSS feed content, add content search features, etc.

By default, your site comes with several built-in widgets

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

Configuring Widgets On Your Sidebar: Tutorial

In this tutorial, you are going to add, configure and reorder a number of frequently-used WordPress widgets to display in your site’s sidebar, including:

  • Adding a clickable Support image linking to your support page.
  • Add a Categories section.
  • Add a Recent Posts section to display the latest posts.
  • Adding a list of your site’s Pages.
  • Display a list of useful Links on your sidebar area.
  • Displaying news items using an RSS Feed section.
  • Add clickable tags through a Tag Cloud section.
  • Adding and configuring an Archives section to your sidebar menu.

The Widgets section can be easily accessed inside the administration by going to Appearance > Widgets …

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets section in your browser …

Widgets Panel

(Widgets Screen)

Let’s begin to configure your widgets …

Adding Text Widgets To The Sidebar

Text widgets are versatile …

WordPress Text widget

(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 can be used to add article snippets, social media buttons, scripts and more to your site … just type in text or paste 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 very useful

(A text widget is versatile!)

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

For this example, we’ll set up a support 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 “help button” graphic image that visitors can click on …

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

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

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

Step 1 – Upload your image.

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

For example …

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 they click on the support button, you must either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link the button graphic to this URL in Step 3 …

Step 2 – Create your support page.

Create a contact page and note the page URL …

Use A Text Widget To Add A Support Button To Your Sidebar Section

Step 3 – Create the code for your text widget.

Don’t worry … this sounds a lot more technical than it is. In simple terms, we just need to create the instructions for your clickable image.

Your code can be written a plain text editor and should look something like this …

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

  • 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 your actual web addresses …

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

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

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

Go back to your Widgets area …

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

In the Available Widgets area, select the Text widget …

Text widget

(WordPress text widget)

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

Drag and drop your Text widget

(Dragging and dropping your Text widget)

Step 5 – Configure the text widget.

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

Text widget

Add a title to your 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 …

Text widget

Important Info

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

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

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

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

Automatically add paragraphs box unchecked

(Automatically add paragraphs option not checked)

Here is some text with Automatically add paragraphs option ticked …

Automatically add paragraphs box selected

(Automatically add paragraphs option selected)

***

Step 6 – Refresh the web browser.

Once you have added the widget and formatted content, go to the front-end of your site and refresh your browser. If you have entered all of the links correctly, then the support button should display in the site’s sidebar menu …

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

(Clickable button widget on blog sidebar)

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

Step 7 – Test your widget.

The final step is to ensure that the destination link works. Test this by clicking on the help button. If you are taken directly to your contact page, then everything has been set up correctly …

Test your text widget to make sure it works

(Test the clickable button)

Practical Tip

Tips:

If you would like a new window to open up when visitors click on the support 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 Contact Button To The Sidebar Menu

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

Add A Support Button To The Sidebar Navigation Section Using A Text Widget - open in new window

When choosing images to add to your sidebar navigation menu, make sure that the width of the 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 are wide and some are narrow. If the sidebar of your theme is narrower than the width of the graphic image, then you may have to either adjust the image size, or the column width to make images display correctly on your sidebar section.

Adjust column width or reduce image size

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

More 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 HTML code. The image will then align to the left.
  • You can link the support button to any destination you like (e.g. to an external link, contact form, forum, etc.) and change this anytime by replacing the content inside your widget.

Adding And Configuring WordPress Widgets In The Sidebar

***

This is the end of section two of this series of tutorials.

Click on this link to keep reading:

***

"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now