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

In this tutorial we are going to show you how to configure a number of sidebar widgets in WordPress.

Configuring Sidebar Widgets

By default, your site comes with several preinstalled widgets, such as widgets that let you display links to your pages, recent posts, RSS feed content, add a search box, etc.

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

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

How To Add Sidebar Widgets In WordPress: Step-By-Step Tutorial

In this tutorial series, you are going to learn how to add, configure and reorder various widgets to display in your site’s sidebar, including:

  • Adding a clickable Contact Us graphic linking visitors to the support page.
  • Adding a Categories section.
  • Add a Recent Posts section to display the latest posts.
  • Adding a list of the site’s Pages.
  • Display useful Links on the sidebar navigation menu.
  • Displaying news items with an RSS Feed section.
  • Add a Tag Cloud.
  • Configure how your Archived Posts display on the sidebar.

To use widgets, access the Widgets section located inside your WordPress administration by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This loads the Widgets area in your browser window …

Widgets Section

(Widgets Panel)

Let’s get started …

Add A Text Widget To The Blog Sidebar Menu

Text widgets are incredibly versatile …

Text widget

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

Text widgets let you insert just about anything you want into your sidebar navigation menu or other widget sections, such as quotes, videos, reviews and more to your site … just by typing in text or inserting HTML into the content area. You can also give the widget a title. Remember to save your settings …

A text widget is really versatile

(A text widget is really versatile!)

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

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

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

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

Use A Text Widget To Add A Support Button To The Sidebar Navigation Section

Step 1 – Upload your image.

Upload the button image to the images folder in your server and write down the address of your server’s image location.

For example …

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

This information will be used in Step 3.

In order for visitors to be taken to your contact page when they click on the help button, you must 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 – Create your contact page.

Create a contact page and note its URL …

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

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, you just need to create the instructions for your clickable image.

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

Add A Contact Button To The Sidebar Navigation Section 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 which sections of the above code you will need to replace with your actual web addresses …

Use A Text Widget To Add A Clickable Support Button To Your Sidebar Section

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 support button should display.

In the Available Widgets area, find a Text widget …

Text widget

(Text widget)

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

Drag and drop your Text widget

(Drag-and-drop your Text widget)

Step 5 – Configure your text widget.

Click on the Text widget title bar to configure the widget 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 URLs into the Content area, then click Save when done …

Text widget

Important Info

Note: Make sure to check your contact page and 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, 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 content like we’re doing in this tutorial).

Here is some text with Automatically add paragraphs box unchecked …

Automatically add paragraphs box unchecked

(Automatically add paragraphs option not selected)

Here is some text added to a Text widget with Automatically add paragraphs option ticked …

Automatically add paragraphs box ticked

(Automatically add paragraphs option checked)

***

Step 6 – Refresh your web browser.

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

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

(Clickable support button widget on sidebar)

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

Step 7 – Test your widget.

The last step is to make sure that the destination URL works. Test your button to make sure that visitors will go to your support page when clicking the button. You should be taken to your contact page …

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

(Test the clickable button)

Practical Tip

Useful Tips:

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

Use A Text Widget To Add A Clickable Support Button To The Sidebar Navigation Area

To this (i.e. include the part that says: target=”_blank” in the code):

Add A Clickable Help Button To Your Sidebar Menu Using A Text Widget - open in new window

When choosing images for your sidebar navigation menu, make sure that the width of the image does not exceed the width of your 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 may be wider or narrower. If your theme’s sidebar is narrower than the width of your graphic images, then you may need to either adjust the image size, or the width of your sidebar column to make graphics display correctly on your sidebar section.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

Extra Tips:

  • If you don’t want your image to be centered inside 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).
  • Link the support button to any URL you want (e.g. to an external site, helpdesk, forum, etc.) and change this anytime by replacing the content inside the text widget.

Adding WordPress Widgets To Your Blog

***

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

To continue reading, click this link:

***

"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)