How To Use And Configure WordPress Widgets – Part 2

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

How To Use WordPress WidgetsIn Part 1 of this tutorial, we explained the basics of how to use WordPress widgets.

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

How To Configure Commonly-Used WordPress Widgets

By default, your site comes with a number of built-in 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 site’s pages, filter posts by categories, text or HTML banners, filter content by tags, etc.

By default, your site comes with several preinstalled widgets

(In a default WordPress installation, your site comes with a number of preinstalled widgets)

How To Set Up Commonly-Used Sidebar Widgets: Step-By-Step Tutorial

In this tutorial series, we will add, configure and reorder various WordPress widgets, including:

  • Adding a Help button linking visitors to your help page.
  • Adding a Categories section.
  • Adding a Recent Posts section to display your latest posts.
  • Add a list of the site’s main Pages.
  • Display important Links on the sidebar area.
  • Adding an RSS Feed section.
  • Adding a Tag Cloud section.
  • Configure how Archived Posts display on your sidebar menu.

The Widgets section is located in your WordPress administration area and can be easily accessed from the dashboard menu by selecting Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This opens the Widgets area in your browser window …

Widgets Area

(Widgets Section)

Let’s start configuring some widgets …

Adding Text Widgets To The Blog Sidebar

Text widgets are incredibly useful …

Text widget

(WordPress Text widget)

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

Text widgets can be used to add events, ads, scripts and more to your site … simply by typing in text or pasting HTML into the widget content area. You can also add an optional title in the Title field. Remember to save your settings …

Text widgets are very useful

(A text widget is very useful!)

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

For this example, we’ll set up a support button on the sidebar that will take 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 you will want visitors to click on …

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

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

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

Step 1 – Upload your image.

To display the image on your site, you must first upload the image to your server and write down the path to your image location.

For example …

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

This information will be used in Step 3.

In order for someone to be taken to the contact page when the graphic 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 your button image to this URL in Step 3

Step 2 – Add your contact page.

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

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

Step 3 – Create the 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. In simple terms, we just need to create the instructions for your clickable image.

Your instructions can be typed in a simple text editor and will look something like this …

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

The image below shows which sections of the above sample code you will need to replace with your actual contact page and image URLs …

Add A Support 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 figuring out basic HTML code, refer to this tutorial:

Now, go back to your Widgets area …

Activate or deactivate widgets using drag-and-drop

(Widgets Panel)

Step 4 – Add a Text widget.

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

In the Available Widgets area, find a Text widget …

WordPress text widget

(Text widget)

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

Drag and drop your Text widget

(Dragging and dropping your Text widget)

Step 5 – Configure your widget settings.

Click on the Text widget title bar to configure its settings. 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 title section to your widget if you want (e.g. “Need Help?”, “Get Support”, etc.) and paste the code with the correct destination links into the Content area, then click Save when done …

Text widget

Info

Note: Remember to check all URLs before pasting scripts into your Text Widget, or the 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 paragraphs (note: this is not necessary if you’re pasting in code like we’re doing in this tutorial).

Here is some text added to a Text widget with Automatically add paragraphs box not checked …

Automatically add paragraphs box not ticked

(Automatically add paragraphs box not checked)

Here is some text with Automatically add paragraphs box selected …

Automatically add paragraphs option ticked

(Automatically add paragraphs box selected)

***

Step 6 – Refresh the browser.

Once you have added the widget and content, go to the front-end of your site and refresh the browser. If all links have been entered correctly, then your support button will display at the top of the site’s sidebar menu …

Using A Text Widget To Add A Contact Button To The Sidebar Navigation Section

(Clickable support button widget on blog sidebar)

The screenshot above shows a clickable button added to a brand new WordPress site.

Step 7 – Test the widget.

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

Test your clickable button

(Test the text widget)

Useful Tip

Useful Tips:

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

Use A Text Widget To Add A Help Button To The Sidebar Area

To this (i.e. insert the section that says: target=”_blank” in your html code):

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

When choosing images to add to your sidebar area, make sure that the width of your image doesn’t exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. Note that some themes may display different column widths depending on their templates and layout. Some sidebars are wide and some are narrow. If your theme’s sidebar width is narrower than the width of your graphic 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 section.

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

(Adjust column width or reduce image size)

More Tips:

  • If you don’t want to center the image in your sidebar, delete the <center> and </center> tags from the beginning and end of the code. The image will then align to the left.
  • You can link the help button to any destination you want (e.g. to an external link, helpdesk, support forum, etc.) and change this anytime by editing the content in your widget.

Adding And Configuring WordPress Widgets In Your Sidebar

***

This is the end of part two of this tutorial on how to use Widgets.

To view Part Three, click this link:

***

"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie