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 Widgets In WordPressIn Part 1 of this step-by-step tutorial series, we explained the basics of using WordPress widgets.

In this tutorial you will learn how to configure various WordPress widgets.

Widget Configuration

By default, your site comes with a number of preinstalled widgets, such as widgets that let you display links to your site’s pages, recent posts, newsfeeds, adding 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 built-in widgets)

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

In this step-by-step tutorial series, we are going to add, configure and reorder a number of frequently-used widgets, including:

  • Adding a clickable Help image linking to your contact page.
  • Adding a Categories section.
  • Adding a Recent Posts section.
  • Add a list of the site’s main Pages.
  • Display useful Links on the sidebar menu.
  • Display news items using an RSS Feed section.
  • Add tag links with a Tag Cloud section.
  • Configure how your Archived Posts display on your sidebar.

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

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets panel in your web browser …

Widgets Panel

(Widgets Panel)

Let’s start to configure some widgets …

Add A Text Widget To Your Blog Sidebar Menu

Text widgets are quite 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)

Text widgets let you insert just about anything you want into the sidebar or other widget sections, such as email and contact information, ads, tips 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 when done …

Text widgets are versatile

(Text widgets are versatile!)

Example: Use A Text Widget To Add A Support Button To Your Sidebar Navigation Section

For this example, let’s set up a clickable help button on your sidebar section 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 can use on your own site …

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

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

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

Step 1 – Upload your image.

Upload the button image to a folder on your server and note the path to your server’s image location.

For example …

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

This information will be required in Step 3.

In order for someone to be taken 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 then link the button graphic to this URL in Step 3

Step 2 – Add your contact page.

Create a contact page and note down its URL …

Use A Text Widget To Add A Clickable Support 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. In simple terms, we just need to create the instructions for your clickable button.

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

Add A Clickable Support Button To Your 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 sample code you need to replace with your actual contact details …

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

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:

Now, go back into your Widgets section …

Activate or deactivate widgets using drag-and-drop

(Widgets Panel)

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

(WordPress text widget)

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

Dragging and dropping your WordPress text widget

(Drag and drop your Text widget)

Step 5 – Configure your text widget.

Click on the Text widget title bar to configure its options. Paste the code with the links to your contact page and graphic button into your 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?”, “Support”, etc.) and paste the code with the correct URLs into the Content box, then click Save when done …

Text widget

Useful Info

Note: Make sure to check your contact page and image links before pasting scripts into the Text Widget, or the clickable button will not work.

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

If 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 type in formatted HTML code like we’re doing in this tutorial).

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

Automatically add paragraphs box not ticked

(Automatically add paragraphs option not selected)

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

Automatically add paragraphs option selected

(Automatically add paragraphs option selected)

***

Step 6 – Refresh your web browser.

Once you have added the text widget and HTML content, visit your site and refresh your web browser. If all links have been entered correctly, then the support button should display in the sidebar menu …

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

(Clickable button widget on blog sidebar)

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

Step 7 – Test the button.

The last step is to make sure that the links work. Test the button to make sure that your visitors will go to the contact page when they click on the button. If you are taken to your support page, then your text widget has been set up correctly …

Test the text widget

(Test your clickable button)

Tip

Tips:

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

Use A Text Widget To Add A Clickable Contact Button To The Sidebar Area

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

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

When inserting images into your sidebar navigation 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 can display elements differently depending on their templates and layout. Some sidebars may be too wide or too narrow. If the sidebar of your theme is narrower than the width of the button image, then you may need to either adjust the graphic size, or the width of your sidebar column to make elements display correctly on your sidebar.

Adjust column width or reduce image size

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

More Tips:

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

Adding And Configuring WordPress Widgets In The Site

***

This is the end of section 2 of this tutorial.

Click here to view Part Three:

***

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