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 The WordPress Blog SidebarIn Part 1 of this tutorial, we explained the basics of how to use WordPress widgets.

In this tutorial you will learn how to begin configuring a number of widgets in WordPress.

Configuring Sidebar Widgets

By default, your site comes with several pre-installed widgets that can be used out of the box with minimal to no configuration required, such as widgets for displaying links to your site’s pages, recent posts, RSS feed content, adding site search features, etc.

By default, your site comes with several pre-installed widgets

(By default, your site comes with a number of built-in widgets)

How To Add Frequently-Used Sidebar Widgets To WordPress: Step-By-Step Tutorial

In this step-by-step tutorial series, you will add, configure and reorder a number of commonly-used WordPress widgets, including:

  • Add a Support Contact button linking to your contact details page.
  • Add a Categories section.
  • Adding a Recent Posts section.
  • Add a list of Pages.
  • Display a list of useful Links on the sidebar navigation menu.
  • Add an RSS Feed section.
  • Adding a list of clickable tags through a Tag Cloud section.
  • Configure how Archived Posts display on the sidebar menu.

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

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This loads the Widgets screen in your browser window …

Widgets Section

(Widgets Area)

Let’s get started …

Adding Text Widgets To Your Sidebar

Text widgets are quite useful …

WordPress Text widget

(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)

A text widget lets you insert just about anything you want into your sidebar navigation menu or other widget sections, such as email and contact information, ads, tips and more to your site … simply by typing in text or pasting HTML into the content area. You can also give the widget a title. Remember to save your settings when done …

Text widgets are very useful

(A text widget is versatile!)

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

For this example, we’ll set up a contact button on the sidebar 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 …

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

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

Add A Help Button To Your Sidebar Menu 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 the button graphic to a folder on your server and note down the path to your image location.

E.g. …

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

This information will be required in Step 3.

In order for someone to be taken to your contact page when they click on the help button, either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link the button image to this URL in Step 3

Step 2 – Create the contact page.

Create a contact page and note down its URL …

Add A Contact Button To The Sidebar Menu Using A Text Widget

Step 3 – Compose your text widget code.

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 linking your graphic image to your contact page.

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

Using A Text Widget To Add A Contact Button To Your Sidebar Navigation 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 image below shows which sections of the above code you will need to replace with the actual contact page and image URLs …

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

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

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

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

In the Available Widgets area, select a Text widget …

WordPress text widget

(Text widget)

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

Drag and drop your Text widget

(Drag-and-drop your WordPress text widget)

Step 5 – Configure the text widget.

Click on the 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 section 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 the save button …

Text widget

Useful Information

Note: Make sure to check all links before pasting scripts into your Text Widget, or the clickable button won’t 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 typing in HTML code like we’re using in the example for this tutorial).

Here is some text with Automatically add paragraphs box not checked …

Automatically add paragraphs box not checked

(Automatically add paragraphs option not selected)

Here is some text with Automatically add paragraphs option checked …

Automatically add paragraphs option checked

(Automatically add paragraphs box selected)

***

Step 6 – Refresh the web browser.

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

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

(Clickable button widget on sidebar)

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

Step 7 – Test the widget.

The last step is to make sure that the clickable button works. Test this by clicking the help button. You should be taken directly to your contact page …

Test your text widget

(Test the text widget to make sure you’ve set everything up correctly)

Useful Tip

Tips:

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

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

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

Add A Clickable Contact Button To Your Sidebar Navigation Menu 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 your sidebar column, especially if you are using a non-responsive WordPress theme. As mentioned earlier, some themes may display elements differently depending on their templates and layout. Some sidebars may be wider or narrower. If your theme’s sidebar is narrower than the width of the graphic image, then you may have to either adjust the graphic size, or the column width to make the images display correctly on your sidebar.

Adjust column width or reduce image size

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

Extra Tips:

  • If you don’t want your 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 left-aligned.
  • Link your contact button to any destination you want (e.g. to an external site, contact form, forum, etc.) and change this anytime by editing the content inside the widget.

How To Add Widgets To WordPress

***

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

To view the rest of this tutorial, click here:

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org