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 series, we cover the basics of using widgets in WordPress.

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

Configuring Widgets

By default, your site comes with a number of preinstalled widgets, such as widgets that let you display links to your pages, recent posts, news items, filter content by publish dates, etc.

By default, your site comes with several preinstalled widgets

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

How To Configure Widgets On The Sidebar: Step-By-Step Tutorial

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

  • Adding a Support Contact button linking to your support page.
  • Adding a Categories section.
  • Adding a Recent Posts section to display the latest posts.
  • Add a list of your site’s Pages.
  • Display important Links on your sidebar.
  • Displaying news items with an RSS Feed section.
  • Add a Tag Cloud section.
  • Adding and configuring an Archives section to your sidebar area.

The Widgets section is located in your WP admin area and can easily be accessed by going to 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 get started …

Add A Text Widget To Your Blog Sidebar Section

Text widgets are incredibly useful …

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

Text widgets let you insert just about anything you want into the sidebar or other widget sections, such as lists, social media buttons, messages and more to your site … just type in text or insert 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 really useful

(A text widget is versatile!)

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

For this example, let’s set up a contact button on the sidebar area that takes 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 graphic image that you can use on your own site …

Add A Clickable Help Button To Your Sidebar Menu Using A Text Widget

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

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

Step 1 – Upload your image.

Upload the image to your server’s images folder and note the address of your image location.

E.g. …

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

You will use this information in Step 3.

For someone to go to the contact page when the graphic button gets clicked, you must either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link your button graphic to this URL in Step 3

Step 2 – Add the contact page.

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

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

Step 3 – Create the code for your text widget.

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

Your instructions can be written a plain text file and will look something like this …

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

  • 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 image below shows the sections of the above code that you will need to replace with the actual contact details …

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

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

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

Go back to 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 the clickable button should display.

In the Available Widgets area, select a Text widget …

Text widget

(Text widget)

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

Dragging and dropping your Text widget

(Dragging and dropping your Text widget)

Step 5 – Configure the text widget settings.

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

Text widget

Important

Note: Remember to check your contact page and image URLs before pasting scripts into your Text Widget, or your button will not 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 an HTML paragraph code (note: not required if you type in code like we’re using in the example for this tutorial).

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

Automatically add paragraphs box not checked

(Automatically add paragraphs box not ticked)

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

Automatically add paragraphs option selected

(Automatically add paragraphs option checked)

***

Step 6 – Refresh your web browser.

After adding the text widget and HTML code, visit the front-end of your site and refresh the web browser. If you have entered all of the links correctly, then the support button will display in your sidebar menu …

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

(Clickable button widget on blog sidebar)

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

Step 7 – Test the widget.

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

Test your text widget

(Test your text widget)

Tip

Text Widgets – Useful Tips:

If you want a new browser window to open up when visitors click on the support 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 Support Button To Your Sidebar Section

To this (i.e. add the section that says: target=”_blank” in your text widget code):

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

When adding images to 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 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 the button image, then you may have to either adjust the graphic size, or the column width to make the images display correctly on your theme.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

More Tips:

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

How To Add Widgets To The WordPress Sidebar Section

***

This is the end of section two of this tutorial.

To continue reading, click this link:

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com