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 WordPress Widgets To The Sidebar MenuIn Part One of this tutorial series, we cover the basics of how to use widgets in WordPress.

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

Configuring Widgets

By default, your site comes with several pre-installed widgets, such as widgets for displaying links to your site’s pages, recent posts, news items, add a search box, etc.

By default, your site comes with several preinstalled widgets

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

How To Set Up Sidebar Widgets: Tutorial

In this tutorial, you are going to add, configure and reorder s number of widgets, including:

  • Add a clickable Help button linking visitors to your help page.
  • Adding a Categories section with a drop down menu.
  • Add a Recent Posts section to display your latest posts.
  • Adding a list of your site’s main Pages.
  • Display Links on the sidebar navigation section.
  • Display news items with an RSS Feed section.
  • Adding a Tag Cloud section.
  • Adding and configuring an Archives section to the sidebar area.

The Widgets section is located inside your admin area by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings you to the Widgets panel in your web browser …

Widgets Area

(Widgets Screen)

Let’s get started …

Add A Text Widget

Text widgets are incredibly versatile …

Text widget

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

A text widget can be used to add events, social media buttons, tips and more to your site … simply by typing in text or inserting HTML into the content area. You can also give the widget a title. Remember to save your settings when done …

A text widget is really useful

(Text widgets are versatile!)

Example: Add A Clickable Support Button To The Sidebar Navigation Menu Using A Text Widget

For this example, let’s set up a contact button on your sidebar 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 visitors can click on …

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

We’ll set up the clickable Help button to display at the top of the sidebar area 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 the image on your site, you must first upload the image to a folder on your server and note the path to your server’s image location.

E.g. …

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

This information will be required in Step 3.

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

Step 2 – Add your destination page.

Create a contact page and note its URL …

Add A Help Button To The Sidebar Area 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, you just need to create the instructions linking your button image to the contact page.

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

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

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

Add A Support Button To Your Sidebar Area 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 with 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 in the location where your clickable button should display.

In the Available Widgets area, select the Text widget …

Text widget

(Text widget)

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

Dragging and dropping your Text widget

(Drag-and-drop your Text widget)

Step 5 – Configure your text widget.

Click on the widget title bar to configure its settings. Paste the code with the URLs 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 your widget if you want (e.g. “Need Help?”, “Get Support”, etc.) and paste the code with the correct destination URLs into the Content box, then click the save button …

Text widget

Important

Note: Remember to check all links before pasting scripts into your Text Widget, or your 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 paste in code like we’re doing in this tutorial).

Here is some text with Automatically add paragraphs box unchecked …

Automatically add paragraphs box not ticked

(Automatically add paragraphs option not selected)

Here is some text with Automatically add paragraphs box ticked …

Automatically add paragraphs option checked

(Automatically add paragraphs box selected)

***

Step 6 – Refresh the browser.

After adding your text widget and formatted content, visit your site and refresh your browser. If all links have been entered correctly, then your clickable support button should display in the sidebar menu …

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

(Clickable button widget on sidebar)

The screenshot above shows the button in the sidebar navigation section of a brand new WordPress site.

Step 7 – Test the widget.

The last step is to ensure that your destination URL works. Test this by clicking on the button. If you are taken directly to the contact page, then everything has been set up correctly …

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

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

Tip

Useful Tips:

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

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

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

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

When adding images to your sidebar section, make sure that the width of your image doesn’t exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. As we’ve previously explained, some themes may display elements differently depending on their templates and their layout. Some sidebars may be wider or narrower. If your theme’s sidebar is narrower than the width of the graphic images, then you may have to either adjust the size of your images, or the column width to make the images display correctly on your theme.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

More Tips:

  • If you don’t want to center the button image inside 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 the contact button to any URL you want (e.g. to an external link, contact form, FAQ page, etc.) and change this anytime by editing the content inside your widget.

How To Add WordPress Widgets To The Website

***

This is the end of part 2 of this tutorial about using Widgets.

Click on this link to continue:

***

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