How To Use And Configure WordPress Widgets – Part 2

Learn how to add, configure, and use text widgets on your WordPress sidebar …

Adding And Configuring WordPress Widgets In The SidebarIn Part 1 of this step-by-step tutorial series, we cover the basics of using WordPress widgets.

In this tutorial you will begin configuring various sidebar widgets in WordPress.

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, RSS feed content, filter content by publish dates, etc.

By default, your site comes with a number of built-in widgets

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

Adding Commonly-Used WordPress Widgets To Your Sidebar: Tutorial

In this tutorial, you are going to add, configure and reorder various WordPress widgets to display in the site’s sidebar, including:

  • Add a clickable Support Contact graphic button linking visitors to your support page.
  • Add a Categories section.
  • Add a Recent Posts section.
  • Add a list of your site’s Pages.
  • Display important Links on the sidebar navigation area.
  • Displaying news items using an RSS Feed section.
  • Adding a Tag Cloud.
  • Add and configure an Archives section to the sidebar.

The Widgets section is located in the 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 up the Widgets section in your web browser …

Widgets Panel

(Widgets Screen)

Let’s get started …

Add A Text Widget To Your Blog Sidebar

Text widgets are incredibly versatile …

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 can be used to add lists of favorite items, image links, forms and more to your site … simply by typing in text or adding HTML into the widget content area. You can also add an optional title in the Title field. Remember to save your settings when done …

A text widget is versatile

(Text widgets are extremely versatile!)

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

For this example, let’s set up a clickable help button on your sidebar section 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 graphic image that visitors can click on …

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

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 Help Button To Your Sidebar Navigation Area Using A Text Widget

Step 1 – Upload your image.

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

E.g. …

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

You will need this information in Step 3.

For visitors to be taken to your contact page when they click on the support 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 – Add your destination page.

Create a contact page and note the page URL …

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

Step 3 – Create the HTML 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. In simple terms, we just need to create the instructions for your clickable image.

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 Your Sidebar Menu

  • 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 with the URL of your image location.

The screenshot below shows which sections of the above sample code you will need to replace with the actual contact details …

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

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, see this tutorial:

Now, 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 your 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 it at the very top of the Widget Area

Drag and drop your WordPress text widget

(Drag and drop your WordPress text widget)

Step 5 – Configure your widget settings.

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

WordPress text widget

Add a title to the widget if you want (e.g. “Need Help?”, “Get Support”, etc.) and paste the code with the correct destination URLs into the large text box, then click Save when done …

WordPress text widget

Useful Info

Note: Remember to test all URLs before pasting scripts into the Text Widget, or your clickable button won’t work.

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

If adding text with no formatting tags, 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 typing in HTML code like we’re using in the example for this tutorial).

Here is some text with Automatically add paragraphs option unchecked …

Automatically add paragraphs box not selected

(Automatically add paragraphs option unchecked)

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

Automatically add paragraphs option checked

(Automatically add paragraphs box selected)

***

Step 6 – Refresh your web browser.

Once you have added the widget and formatted content, go to your site and refresh your web browser. If you have entered all of the links correctly, then your clickable support button will display in your site’s sidebar menu …

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

(Clickable support button widget on sidebar)

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

Step 7 – Test the button.

The last step is to ensure that your clickable button works. Test this by clicking on the support button. You should be taken directly to your contact page …

Test your clickable button

(Test the text widget)

Tip

Text Widgets – Useful Tips:

If you want your support page to display in a new window when visitors click on the support (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 The Sidebar Section

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

Use A Text Widget To Add A Help Button To The Sidebar Navigation Section - open in new window

When choosing images to add to your sidebar navigation area, make sure that the width of your image does not exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. As mentioned earlier, some themes can display different column widths depending on their templates and their layout. Some sidebars are wide and some are narrow. If your theme’s sidebar width is narrower than the width of your button images, then you may have to either adjust the image size, or the width of your sidebar column to make images display correctly on your sidebar.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

More Tips:

  • If you don’t want your 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 align to the left.
  • Link your support button to any URL you like (e.g. to an external site, contact form, forum, etc.) and change this anytime by replacing the content in your text widget.

Adding And Configuring WordPress Widgets In Your Blog

***

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

To continue reading, click here:

***

"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