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 Your BlogIn Part 1 of this step-by-step tutorial series, we cover the basics of using widgets in WordPress.

In this tutorial you will learn how to begin configuring several widgets in WordPress.

Sidebar Widget Configuration

In a default WordPress installation, your site comes with a number of preinstalled active widgets, such as widgets that let you display links to your pages, filter posts by categories, text or HTML banners, adding search features, etc.

By default, your site comes with a number of preinstalled widgets

(By default, your site comes with a number of active widgets)

How To Add Widgets To Your Sidebar Area: Tutorial

In this step-by-step tutorial, you will learn how to add, configure and reorder various WordPress widgets, including:

  • Adding a Support graphic linking to your support page.
  • Add a Categories section with a drop down menu.
  • Adding a Recent Posts section.
  • Adding a list of the site’s main Pages.
  • Display useful Links on your sidebar.
  • Add an RSS Feed section.
  • Add clickable tags with a Tag Cloud section.
  • Configure how Archived Posts display on the sidebar.

The Widgets panel is located in the WordPress dashboard and can 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 Section

(Widgets Section)

Let’s get started …

Text Widgets

Text widgets are quite 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 single lines or paragraphs of text, images, special promotions and more to your site … just 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 …

Text widgets are very useful

(A text widget is really versatile!)

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

For this example, we’ll set up a clickable contact 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, create or source a graphic image that your visitors can click on …

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

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

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

Step 1 – Upload your image.

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

E.g. …

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

This information will be required in Step 3.

For visitors to be taken to your contact page when they click on the graphic button, you will need to 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 destination page.

Create a contact page and note the page URL …

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

Step 3 – Create the HTML code for your text widget.

Don’t worry … this sounds a lot more technical than it is. In simple terms, you just need to create the instructions for your clickable button.

Your code can be written a simple 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 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 need to replace with your actual contact page and image URLs …

Add A Help Button To Your Sidebar Navigation Section 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 with basic HTML code, see this tutorial:

Next, go back to your Widgets screen …

Activate or deactivate widgets using drag and drop

(Widgets Screen)

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, find the Text widget …

Text widget

(Text widget)

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

Drag-and-drop your WordPress text widget

(Dragging and dropping your WordPress text widget)

Step 5 – Configure the widget.

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

Text widget

Add a title section to your widget if you want (e.g. “Need Help?”, “Support”, etc.) and paste the code with the correct destination links into the Content box, then click the save button …

Text widget

Important

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

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

If you’re 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 formatted content like we’re using in the example for this tutorial).

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

Automatically add paragraphs box unchecked

(Automatically add paragraphs option not checked)

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

Automatically add paragraphs box selected

(Automatically add paragraphs box selected)

***

Step 6 – Refresh the web browser.

After adding your widget and HTML content, go to your site and refresh your browser. If you have entered all of the links correctly, then the clickable support button should display in your site’s sidebar menu …

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

(Clickable support button widget on blog sidebar)

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

Step 7 – Test the widget.

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

Test the clickable button

(Test your clickable button)

Useful Tip

Text Widgets – Useful Tips:

If you want a new window to open up when visitors click on your help button (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 Section

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

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

When choosing images to add to 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 may display different column widths depending on their templates and layout. Some sidebars may be wider or narrower. If your theme’s sidebar is narrower than the width of the button image, then you may need to either adjust the graphic size, or the column width to make elements display correctly on your sidebar section.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

Additional Tips:

  • If you don’t want to center your button image inside your sidebar, delete the <center> and </center> tags from the beginning and end of the HTML code. The image will then be aligned to its default settings (normally left-aligned).
  • You can link the support button to any destination you want (e.g. to an external site, helpdesk, support forum, etc.) and change this anytime by replacing the content in the text widget.

Using WordPress Widgets

***

This is the end of section two of this tutorial series on using WordPress widgets.

To continue, click here:

***

"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum