How To Use And Configure WordPress Widgets – Part 2

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

Adding Widgets To The Sidebar SectionIn Part One of this step-by-step tutorial, we explained the basics of how to use WordPress widgets.

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

Sidebar Widget Configuration

By default, your site comes with several preinstalled widgets that can be used out of the box with minimal to no configuration needed, such as widgets that let you display links to your pages, filter posts by categories, text or HTML banners, add a search box, etc.

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

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

Configuring Commonly-Used WordPress Sidebar Widgets In WordPress: Tutorial

In this tutorial series, we are going to add, configure and reorder s number of widgets to display in the site’s sidebar, including:

  • Adding a Help graphic linking visitors to your help page.
  • Adding a Categories section.
  • Add a Recent Posts section.
  • Adding a list of your site’s main Pages.
  • Display important Links on the sidebar section.
  • Displaying news items using an RSS Feed section.
  • Adding a Tag Cloud.
  • Configure how your Archived Posts display on the sidebar navigation area.

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

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This loads the Widgets section in your web browser …

Widgets Section

(Widgets Panel)

Let’s get started …

Add A Text Widget To The Blog Sidebar

Text widgets are incredibly useful …

WordPress Text widget

(Text widget)

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 your sidebar or other widget sections, such as email and contact information, image links, reviews and more to your site … simply type in text or add HTML into the content area. You can also add an optional title in the Title field. Remember to save your settings …

A text widget is really versatile

(Text widgets are really useful!)

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

For this example, let’s set up a help button on your sidebar navigation menu that takes 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 …

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

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

Use A Text Widget To Add A Contact Button To Your Sidebar Navigation Section

Step 1 – Upload your image.

To display the image on your site, the button image must be uploaded to your server. Upload your button graphic to a folder on your server and note the URL pointing 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 be taken to your contact page when they click on the graphic 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 the support page.

Create a contact page and note its URL …

Use A Text Widget To Add A Clickable Contact Button To Your Sidebar Navigation 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. Basically, we just need to create the instructions linking your graphic image to your destination URL.

Your code can be written a plain text file and will look something like this …

Add A Clickable Help Button To Your Sidebar Menu 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 image below shows the sections of the above sample code that you will need to replace with your actual web addresses …

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

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

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

Go back to your Widgets area …

Activate or deactivate widgets using drag & 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 a Text widget …

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 Text widget

(Dragging and dropping your Text widget)

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

WordPress text widget

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

WordPress text widget

Important

Note: Make sure to check your contact page and button image URLs before pasting scripts into the Text Widget, or your button won’t work.

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

If you’re adding text without 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 code like we’re using in the example for this tutorial).

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

Automatically add paragraphs box not checked

(Automatically add paragraphs box not ticked)

Here is some text with Automatically add paragraphs option checked …

Automatically add paragraphs box checked

(Automatically add paragraphs box checked)

***

Step 6 – Refresh your web browser.

Once you have added the widget and content, visit the front-end of your site and refresh the web browser. If you have entered all of the links correctly, then your clickable support button should display at the top of your sidebar menu …

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

(Clickable 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 last step is to make sure that the destination link works. Test the button to make sure that your visitors will go to your support page when clicking the button. If you are taken directly to your support page, then your text widget has been set up correctly …

Test your text widget to ensure you've set up everything correctly

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

Useful Tip

Useful Tips:

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

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

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

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

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

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

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

Extra Tips:

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

How To Add And Configure Widgets In The WordPress Blog Sidebar

***

This is the end of part 2 of this tutorial.

Click on this link to keep reading:

***

"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya