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 SidebarIn Part 1 of this tutorial series, we explained the basics of using widgets in WordPress.

In this tutorial you will learn how to begin configuring a number of WordPress widgets.

How To Configure Frequently-Used WordPress Sidebar Widgets

In a default WordPress installation, your site comes with a number of preinstalled active widgets, such as widgets for displaying external links, filter posts by categories, text or HTML banners, adding tag clouds, etc.

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

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

Adding Sidebar Widgets In WordPress: Tutorial

In this step-by-step tutorial series, you will learn how to add, configure and reorder s number of WordPress widgets to display in your site’s sidebar, including:

  • Adding a Support Contact graphic linking visitors to your help page.
  • Add a Categories section.
  • Adding a Recent Posts section to display your latest posts.
  • Adding a list of Pages.
  • Display Links on the sidebar area.
  • Add an RSS Feed section.
  • Adding tags to your sidebar through a Tag Cloud.
  • Add and configure an Archives section to the sidebar area.

The Widgets panel is located in your WP dashboard and can easily be accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets section in your web browser …

Widgets Screen

(Widgets Panel)

Let’s begin configuring your widgets …

Add A Text Widget

Text widgets are quite useful …

WordPress Text widget

(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 can be used to add notices, image links, special promotions and more to your site … simply by typing in text or adding HTML into the content area. You can also give the widget a title. Remember to save your settings when done …

A text widget is extremely versatile

(Text widgets are very useful!)

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

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

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

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

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

Step 1 – Upload your image.

To display an image on your site, the graphic image must be uploaded to your server. Upload your button image to the images folder in your server and note the path to your image location.

For example …

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

This information will be required in Step 3.

In order for visitors to go to the contact page when they click on the help 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 a contact page.

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

Using A Text Widget To Add A Clickable Help Button To Your Sidebar Navigation Area

Step 3 – Compose 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. Basically, you just need to create the instructions linking your graphic image to your destination URL.

Your instructions can be written a plain text editor and should look something like this …

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

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

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

Replace the above URLs and then copy all of your text file content to your clipboard when finished.

If you need help understanding basic HTML code, refer to this tutorial:

Now, go back to your Widgets panel …

Activate or deactivate widgets using drag & drop

(Widgets Area)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar where you would like the clickable button to display.

In the Available Widgets area, find the Text widget …

WordPress text widget

(Text widget)

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

Drag and drop your WordPress text widget

(Drag and drop your WordPress text widget)

Step 5 – Configure your widget.

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

WordPress text widget

Info

Note: Remember to check your contact page and button image URLs before pasting scripts into your Text Widget, or your clickable button won’t work.

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

If adding text without 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: this is not necessary if you’re pasting in formatted HTML code like we’re doing in this tutorial).

Here is some text with Automatically add paragraphs box unchecked …

Automatically add paragraphs option not selected

(Automatically add paragraphs box unchecked)

Here is some text with Automatically add paragraphs option selected …

Automatically add paragraphs box checked

(Automatically add paragraphs option selected)

***

Step 6 – Refresh your web browser.

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

Using A Text Widget To Add A Help Button To The Sidebar Navigation Area

(Clickable support button widget on sidebar)

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

Step 7 – Test your button.

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

Test the text widget

(Test the clickable button)

Useful Tip

Text Widgets – Useful Tips:

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

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

To this (i.e. include the part containing target=”_blank” in your html code):

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

When inserting images into your sidebar menu, make sure that the width of the image does not 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 have to either adjust the size of your images, or the column width to make graphics display correctly on your sidebar area.

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

(Adjust column width or reduce image size)

More Tips:

  • If you don’t want the image to be centered inside your 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).
  • You can link your contact button to any destination you want (e.g. to an external link, helpdesk, support forum, etc.) and change this anytime by editing the links in your text widget.

How To Add And Configure WordPress Widgets In The Sidebar Navigation Menu

***

This is the end of part 2 of this series of tutorials on using WordPress widgets.

Click on this link to access the rest of this tutorial series:

***

"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com