How To Use And Configure WordPress Widgets – Part 2

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

Configuring Widgets On The WordPress SidebarIn Part 1 of this tutorial, we explained the basics of using widgets in WordPress.

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

Configuring Widgets

By default, your site comes with several built-in widgets, such as widgets that let you display links to your pages, recent posts, newsfeeds, adding site search features, etc.

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

(In a default WordPress installation, your site comes with several active widgets)

Setting Up Commonly-Used WordPress Sidebar Widgets: Tutorial

In this tutorial, you will add, configure and reorder s number of WordPress widgets, including:

  • Adding a clickable Contact Us image linking visitors to the contact page.
  • Add a Categories section.
  • Adding a Recent Posts section to display the latest posts.
  • Adding a list of your site’s main Pages.
  • Display important Links on your sidebar navigation section.
  • Adding an RSS Feed section.
  • Add a Tag Cloud section.
  • Configure how your Archived Posts display on the sidebar area.

The Widgets screen is located inside your WordPress admin area and can be accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings you to the Widgets screen into your browser …

Widgets Area

(Widgets Panel)

Let’s get started …

Adding Text Widgets

Text widgets are incredibly versatile …

Text widget

(Text widget)

Important 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 the sidebar section or other widget sections, such as comments, images, reviews and more to your site … simply type in text or add HTML into the content area. You can also give the widget a title. Remember to save your settings when done …

A text widget is extremely versatile

(A text widget is very useful!)

Example: Add A Contact Button To Your Sidebar Navigation Area Using A Text Widget

For this example, let’s set up a contact button on the sidebar that will take 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, create or source a “help button” graphic image that visitors can click on …

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

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

Use A Text Widget To Add A Help Button To Your Sidebar Menu

Step 1 – Upload your image.

To display the clickable button image on your site, the button image must be uploaded to your server. Upload the button image to your server and note the address of your image location.

E.g. …

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

This information will be required in Step 3.

For visitors to go 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 link your button graphic to this URL in Step 3

Step 2 – Add the destination page.

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

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

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. In simple terms, we just need to create the instructions linking your button image to the contact page/helpdesk.

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

Add A Clickable Support Button To Your Sidebar Navigation Section Using A Text Widget

  • Replace “http://www.yourdomain.com/contact-us” in the code above 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 the actual contact details …

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

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

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

Go back into your Widgets area …

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

In the Available Widgets area, select the Text widget …

Text widget

(Text widget)

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

Drag and drop your WordPress text widget

(Drag and drop your WordPress text widget)

Step 5 – Configure the widget.

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

Text widget

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

WordPress text widget

Useful Information

Note: Remember to test all URLs before pasting scripts into the Text Widget, or the button will not work.

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

If 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: this is not necessary if you’re pasting in formatted HTML content 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 checked …

Automatically add paragraphs box not selected

(Automatically add paragraphs option not ticked)

Here is some text with Automatically add paragraphs box checked …

Automatically add paragraphs box ticked

(Automatically add paragraphs box selected)

***

Step 6 – Refresh your browser.

Once you have added the widget and HTML code, go to the front end of your site and refresh your web browser. If you have entered all of the links correctly, then your clickable support button should display in your sidebar menu …

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

(Clickable button widget on sidebar)

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

Step 7 – Test the widget.

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

Test the clickable button to ensure you've set up everything correctly

(Test your clickable button)

Practical Tip

Tips:

If you would like your contact page to display inside a new browser window when visitors click on the help (so they don’t leave the page they’re in), then change the text widget code from this:

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

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

Use A Text Widget To Add A Contact Button To The Sidebar Navigation Menu - open in new window

When choosing images to add to your sidebar navigation menu, 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. 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 the graphic images, then you may need to either adjust the graphic size, or the width of your sidebar column to make elements display correctly on your sidebar.

Adjust column width or reduce image size

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

Extra Tips:

  • If you don’t want your button image to be centered in your sidebar, delete the <center> and </center> tags from the beginning and end of the line of code. The image will then be aligned to its default settings (normally left-aligned).
  • Link the contact button to any destination you like (e.g. to an external site, contact form, FAQ page, etc.) and change this anytime by replacing the content in your text widget.

Using Widgets In WordPress

***

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

To continue, click here:

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)