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 Your BlogIn Part One of this step-by-step tutorial, we explained the basics of using widgets in WordPress.

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

Widget Configuration

By default, your site comes with a number of built-in active widgets, such as widgets that let you display links to your pages, filter posts by categories, news items, add tag clouds, etc.

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

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

How To Add Commonly-Used Sidebar Widgets To WordPress: Step-By-Step Tutorial

In this step-by-step tutorial series, we are going to add, configure and reorder various WordPress widgets to display in the site’s sidebar navigation section, including:

  • Add a clickable Help graphic linking visitors to the help page.
  • Add a Categories section with a drop down menu.
  • Add a Recent Posts section.
  • Adding a list of your site’s most important Pages.
  • Display a list of useful Links on your sidebar.
  • Adding an RSS Feed section.
  • Adding a Tag Cloud.
  • Add and configure an Archives section to your sidebar.

The Widgets screen is located in the WordPress admin area and can easily be accessed from the WP admin menu by selecting Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings you to the Widgets section into your browser …

Widgets Section

(Widgets Screen)

Let’s configure WordPress text widgets …

Add A Text Widget To The Sidebar Navigation Menu

Text widgets are quite useful …

Text widget

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

A text widget lets you insert just about anything you want into the sidebar section or other widget sections, such as policies, image links, forms and more to your site … simply type in text or insert HTML into the content area. You can also give the widget a title. Remember to save your settings …

A text widget is really versatile

(Text widgets are really useful!)

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

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

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

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

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

Step 1 – Upload your image.

To display an image on your site, the graphic image must be uploaded to your server. Upload the image to a folder on your server and note down the URL pointing to your image location.

For example …

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

You will need this information in Step 3.

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

Step 2 – Add your destination page.

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

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

Step 3 – Create your text widget code.

Don’t worry … this sounds a lot more technical than it is. Basically, you just need to create the instructions for your clickable button.

Your code can be composed in a plain text editor and will look something like this …

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

  • 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 the sections of the above sample code that you need to replace with your actual web addresses …

Add A Clickable Support Button To The Sidebar Navigation Menu 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 understanding basic HTML code, see this tutorial:

Go back into your Widgets screen …

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 would like your clickable 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

Dragging and dropping your Text widget

(Drag-and-drop your WordPress text widget)

Step 5 – Configure the widget.

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

Text widget

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

Text widget

Useful Information

Note: Make sure to test all URLs before pasting scripts into your Text Widget, or the 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: not required if you paste in formatted content like we’re doing in this tutorial).

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

Automatically add paragraphs option unchecked

(Automatically add paragraphs option not selected)

Here is some text with Automatically add paragraphs option checked …

Automatically add paragraphs option ticked

(Automatically add paragraphs option selected)

***

Step 6 – Refresh the web browser.

Once you have added the widget and HTML code, go to the front end of your site and refresh your web browser. If you have entered all of the links correctly, then the support button should display in your sidebar menu …

Add A Clickable Contact Button To Your Sidebar Navigation Menu Using A Text Widget

(Clickable button widget on blog sidebar)

The above screenshot shows a clickable button added to a newly-installed WordPress site.

Step 7 – Test the widget.

The final step is to ensure that the destination URL works. Test this by clicking on the graphic button. You should be taken to your contact page …

Test your text widget

(Test the text widget)

Tip

Text Widgets – Useful Tips:

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

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

To this (i.e. add the part containing target=”_blank” in the text widget code):

Add A Contact Button To The Sidebar Menu Using A Text Widget - open in new window

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

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

(Adjust column width or reduce image size)

More Tips:

  • If you don’t want to center the image inside the sidebar, delete the <center> and </center> tags from the beginning and end of the HTML code. The image will then align to the left.
  • Link the contact button to any destination you want (e.g. to an external site, contact form, forum, etc.) and change this anytime by replacing the content inside your text widget.

How To Add Widgets To Your WordPress Blog Sidebar Area

***

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

Click on this link to continue reading:

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)