How To Use And Configure WordPress Widgets – Part 2

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

How To Add And Configure Widgets In The WordPress SidebarIn Part 1 of this step-by-step tutorial, we explained the basics of using WordPress widgets.

In this tutorial you are going to begin configuring several WordPress sidebar widgets.

Configuring Commonly-Used WordPress Widgets

By default, your site comes with several pre-installed active widgets, such as widgets that let you display links to your pages, filter posts by categories, text or HTML banners, add tag clouds, etc.

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

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

Setting Up Widgets On The Blog Sidebar Menu: Step-By-Step Tutorial

In this step-by-step tutorial series, you are going to learn how to add, configure and reorder various WordPress widgets, including:

  • Add a clickable Contact Us button linking visitors to your contact details page.
  • Add 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 the sidebar.
  • Add an RSS Feed section.
  • Adding a list of clickable tags using a Tag Cloud.
  • Configure how Archived Posts display on the sidebar navigation section.

The Widgets panel is located inside the WP administration 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 Section

(Widgets Panel)

Let’s get started …

Add A Text Widget

Text widgets are versatile …

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)

Text widgets let you insert just about anything you want into the sidebar or other widget sections, such as quotes, image links, reviews and more to your site … just type in text or add HTML into the content area. You can also give the widget a title. Remember to save your settings …

Text widgets are very useful

(Text widgets are extremely versatile!)

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

For this example, we’ll set up a contact button on the 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, you will need to create or source a graphic image that your visitors can click on …

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

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

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

Step 1 – Upload your image.

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

For example …

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

You will use this information in Step 3.

In order for visitors to go 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 your button image to this URL in Step 3

Step 2 – Create a support page.

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

Add A Support Button To Your Sidebar Navigation Section 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. In simple terms, we just need to create the instructions for your clickable image.

Your instructions can be written a simple text file and should look something like this …

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

  • 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 which sections of the above code you need to replace with your actual contact page and image URLs …

Use A Text Widget To Add A Contact Button To The Sidebar Navigation Menu

Replace the above URLs and then copy all of your text file content to your clipboard when finished.

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

Go back into your Widgets screen …

Activate or deactivate widgets using drag & drop

(Widgets Panel)

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 …

WordPress text widget

(Text widget)

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

Drag-and-drop your Text widget

(Dragging and dropping your WordPress text widget)

Step 5 – Configure your widget.

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

WordPress text widget

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

WordPress text widget

Info

Note: Make sure to test all URLs before pasting scripts into your Text Widget, or your clickable 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 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 option not checked …

Automatically add paragraphs option not checked

(Automatically add paragraphs option not checked)

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

Automatically add paragraphs box ticked

(Automatically add paragraphs option selected)

***

Step 6 – Refresh the browser.

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

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

(Clickable button widget on blog sidebar)

The screenshot above shows a clickable button in the sidebar navigation section of a newly-installed WordPress site.

Step 7 – Test your widget.

The last step is to ensure that your clickable button works. Test the button to make sure that your visitors will go to the help page when clicking the button. If you are taken directly to your support page, then the text widget has been set up correctly …

Test your clickable button

(Test the clickable button to ensure it works)

Useful Tip

Useful Tips:

If you want the contact page to display in a new window when visitors click on the help (so they don’t leave the page they’re on), then change the text widget 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 the text widget code):

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

When choosing images for your sidebar section, make sure that the width of the image doesn’t exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. As we’ve previously mentioned, some themes can 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 have to either adjust the graphic size, or the column width to make the images display correctly on your sidebar area.

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

(Adjust column width or reduce image size)

Extra Tips:

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

Adding And Configuring WordPress Widgets On The Sidebar Navigation Section

***

This is the end of part two of this tutorial series on using Widgets.

Click on this link to continue:

***

"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