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 Widgets To Your WordPress Sidebar SectionIn Part One of this step-by-step tutorial series, we cover the basics of using widgets in WordPress.

In this tutorial you will learn how to configure several WordPress widgets.

How To Configure Commonly-Used WordPress Blog Sidebar Widgets

In a default WordPress installation, 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, filter content by tags, etc.

By default, your site comes with a number of preinstalled widgets

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

Configuring Frequently-Used WordPress Sidebar Widgets In WordPress: Step-By-Step Tutorial

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

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

To use widgets, access the Widgets panel located inside your admin by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings you to the Widgets section in your browser window …

Widgets Section

(Widgets Section)

Let’s begin by configuring WordPress text widgets …

Adding Text Widgets

Text widgets are incredibly useful …

Text widget

(WordPress Text widget)

Useful Information

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 lists, image links, reviews and more to your site … just type in text or paste HTML into the widget content area. You can also give the widget a title. Remember to save your settings …

A text widget is really useful

(A text widget is versatile!)

Example: Use A Text Widget To Add A Contact Button To Your Sidebar Navigation Menu

For this example, let’s set up a support 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, you will need to create or source a “help button” graphic image that you will use on your own site …

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

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

Add A Clickable Contact Button To The Sidebar Navigation Area Using A Text Widget

Step 1 – Upload your image.

To display the clickable image on your site, the button image must be uploaded to your server. Upload your button graphic to the images folder in 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.

In order for someone to be taken to the contact page when they click on the graphic button, 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 a contact page.

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

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

Step 3 – Create the HTML 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 linking your button image to the destination URL.

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

Add A Support Button To The Sidebar Menu 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 with the URL of your image location.

The screenshot below shows which sections of the above sample code you will need to replace with the actual web addresses …

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

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

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

Now, go back to your Widgets area …

Activate or deactivate widgets using drag-and-drop

(Widgets Screen)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar in the location where your clickable button should display.

In the Available Widgets area, find the Text widget …

WordPress text widget

(WordPress text widget)

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

Dragging and dropping your WordPress text widget

(Drag and drop your Text widget)

Step 5 – Configure the widget settings.

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

WordPress text widget

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

Text widget

Important

Note: Make sure to test all URLs before pasting scripts into the Text Widget, or the button won’t work.

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

If you’re 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 HTML code 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 option not ticked

(Automatically add paragraphs box not checked)

Here is some text with Automatically add paragraphs box checked …

Automatically add paragraphs box selected

(Automatically add paragraphs box selected)

***

Step 6 – Refresh the web browser.

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

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

(Clickable button widget on sidebar)

The screenshot above shows the support contact button in the sidebar of a brand new WordPress site.

Step 7 – Test your widget.

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

Test your clickable button

(Test your clickable button)

Tip

Text Widgets – Useful Tips:

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

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

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

Add A Clickable Support Button To Your Sidebar Section Using A Text Widget - open in new window

When adding images 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 may display elements differently depending on their templates and layout. Some sidebars may be wider or narrower. If the sidebar of your theme is narrower than the width of your graphic images, then you may need to either adjust the graphic size, or the column width to make graphics display correctly on your theme.

Adjust column width or reduce image size

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

Additional Tips:

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

Adding And Configuring WordPress Widgets On Your Sidebar

***

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

Click here to access the rest of this tutorial:

***

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