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 WordPressIn Part One of this step-by-step tutorial series, we cover the basics of how to use widgets in WordPress.

In this section you will learn how to configure a number of frequently-used widgets in WordPress.

Configuring Commonly-Used WordPress Sidebar Widgets

By default, your site comes with several preinstalled active widgets, such as widgets that let you display links to your site’s pages, filter posts by categories, newsfeeds, add search features, 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 active widgets)

Adding Sidebar Widgets In WordPress: Step-By-Step Tutorial

In this step-by-step tutorial, we will add, configure and reorder a number of frequently-used widgets to display in the site’s sidebar navigation area, including:

  • Add a Help graphic linking visitors to your support page.
  • Add a Categories section.
  • Adding a Recent Posts section to display your latest posts.
  • Adding a list of Pages.
  • Display important Links on the sidebar menu.
  • Displaying newsfeeds using an RSS Feed section.
  • Adding a Tag Cloud.
  • Configure how your Archived Posts display on the sidebar navigation area.

To use widgets, access the Widgets panel located inside the dashboard by going to Appearance > Widgets …

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings you to the Widgets area into your browser …

Widgets Panel

(Widgets Section)

Let’s begin configuring your sidebar widgets …

Text Widgets

Text widgets are incredibly versatile …

Text widget

(WordPress Text widget)

Important

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 can be used to add notices, ads, 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 …

A text widget is extremely versatile

(A text widget is very useful!)

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

For this example, we’ll set up a clickable contact button on your 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, create or source a “help button” 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 Help button to display at the top of the sidebar section like in the example shown below …

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

Step 1 – Upload your image.

To display the clickable button image on your site, the graphic image must be uploaded to your server. Upload your image to your server and write down 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 go to the contact page when the help button gets clicked, either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will then link the button image to this URL in Step 3 …

Step 2 – Create a support page.

Create a contact page and note the page URL …

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

Step 3 – Compose the HTML code for your text widget.

If you’re not a technical-minded person, don’t worry … this sounds a lot more technical than it is. Basically, we just need to create the instructions for your clickable image.

Your code can be written a simple text editor and will look something like this …

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

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

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

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

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

Now, go back to your Widgets section …

Activate or deactivate widgets using drag and drop

(Widgets Screen)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar where you want your clickable button to display.

In the Available Widgets area, find a Text widget …

WordPress text widget

(Text widget)

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

Drag-and-drop your WordPress text widget

(Drag-and-drop your WordPress text widget)

Step 5 – Configure the text 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 your text widget content area and click the save button …

Text widget

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

Text widget

Important

Note: Make sure to check all links before pasting scripts into the Text Widget, or your 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 an HTML paragraph code (note: not required if you’re pasting in formatted content like we’re doing in this tutorial).

Here is some text with Automatically add paragraphs option not selected …

Automatically add paragraphs box not checked

(Automatically add paragraphs option not selected)

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

Automatically add paragraphs box selected

(Automatically add paragraphs option checked)

***

Step 6 – Refresh your browser.

Once you have added your widget and formatted content, visit the front end of your site and refresh your browser. If all links have been entered correctly, then the support button will display in your sidebar menu …

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

(Clickable support button widget on sidebar)

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

Step 7 – Test your button.

The final step is to make sure that the links work. Test this by clicking on the button. You should be taken to the support page …

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

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

Useful Tip

Useful Tips:

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

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

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

Using A Text Widget To Add A Clickable Help Button To The Sidebar Navigation Menu - open in new window

When choosing images to add to your sidebar area, 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 elements differently 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 your button image, then you may have to either adjust the size of your images, or the width of your sidebar column to make elements display correctly on your sidebar area.

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

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

More Tips:

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

Adding And Configuring WordPress Widgets In The Blog

***

This is the end of part 2 of this tutorial series about using WordPress widgets.

Click on this link to continue:

***

"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com