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 And Configure WordPress Widgets In Your WebsiteIn Part One of this tutorial, we cover the basics of using WordPress widgets.

In this tutorial you are going to learn how to begin configuring a number of commonly-used WordPress widgets.

Widget Configuration

In a default WordPress installation, your site comes with a number of built-in widgets that can be used out of the box with minimal to no configuration needed, such as widgets that let you display links to your site’s pages, filter posts by categories, RSS feed content, adding site search features, etc.

In a default WordPress installation, your site comes with several preinstalled widgets

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

Configuring Frequently-Used WordPress Widgets On The WordPress Sidebar Navigation Area: Tutorial

In this tutorial series, you will add, configure and reorder various frequently-used WordPress widgets, including:

  • Adding a Contact Us image linking to the contact details page.
  • Adding a Categories section.
  • Adding a Recent Posts section.
  • Adding a list of the site’s main Pages.
  • Display a list of useful Links on your sidebar menu.
  • Display a newsfeed using an RSS Feed section.
  • Add a Tag Cloud section.
  • Adding and configuring an Archives section to your sidebar.

To use widgets, access the Widgets panel located inside your admin by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets screen into your web browser …

Widgets Area

(Widgets Section)

Let’s begin to configure some sidebar widgets …

Add A Text Widget To Your Sidebar Navigation Area

Text widgets are quite useful …

WordPress Text widget

(WordPress 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 comments, images, scripts and more to your site … simply type in text or add HTML into the content area. You can also give the widget a title. Remember to save your settings when done …

Text widgets are really useful

(A text widget is versatile!)

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

For this example, we’ll set up a clickable contact button on the sidebar 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 “help button” graphic image that your 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 Contact Button To Your Sidebar Area Using A Text Widget

Step 1 – Upload your image.

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

For example …

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

This information will be required in Step 3.

For someone to go to the 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 link the button image to this URL in Step 3

Step 2 – Create your support page.

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

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

Step 3 – Compose your text widget code.

Don’t worry … this sounds a lot more technical than it is. In simple terms, you just need to create the instructions linking the graphic image to the contact page.

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

Add A Clickable Support Button To Your Sidebar Navigation Menu 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 screenshot below shows the sections of the above code that you will need to replace with your actual web addresses …

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

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

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

Go back into your Widgets panel …

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 want the clickable button to display.

In the Available Widgets area, find the Text widget …

WordPress text widget

(Text widget)

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

Drag-and-drop your 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 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 your widget if you want (e.g. “Need Help?”, “Get Support”, etc.) and paste the code with the correct URLs into the text area, then click the save button …

Text widget

Important

Note: Remember 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 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 HTML content like we’re using in the example for this tutorial).

Here is some text with Automatically add paragraphs box not ticked …

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 checked

(Automatically add paragraphs box checked)

***

Step 6 – Refresh your browser.

Once you have added the text widget and code, go to the front-end of your site and refresh your web browser. If all links have been entered correctly, then the support button should display at the top of your site’s sidebar menu …

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

(Clickable button widget on sidebar)

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

Step 7 – Test the widget.

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

Test your clickable button

(Test the clickable button)

Practical Tip

Text Widgets – Useful Tips:

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

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

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

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

When choosing images to add to 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. As mentioned earlier, some themes can display different column widths 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 have to either adjust the size of your images, or the column width to make images display correctly on your sidebar section.

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

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

More Tips:

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

How To Use Widgets

***

This is the end of section two of this tutorial.

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

***

"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya