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

In this tutorial you will configure a number of frequently-used sidebar widgets in WordPress.

Configuring Frequently-Used WordPress Widgets

By default, your site comes with several built-in widgets that can be used out of the box with little to no configuration needed, such as widgets that let you display links to your pages, recent posts, RSS feed content, adding a search box, etc.

In a default WordPress installation, your site comes with several built-in widgets

(By default, your site comes with several active widgets)

How To Set Up Commonly-Used WordPress Sidebar Widgets In WordPress: Tutorial

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

  • Add a Support Contact graphic linking visitors to the support page.
  • Adding a Categories section.
  • Adding a Recent Posts section.
  • Add a list of the site’s most important Pages.
  • Display useful Links on your sidebar menu.
  • Display the latest news using an RSS Feed section.
  • Add a Tag Cloud.
  • Configure how your Archived Posts display on the sidebar navigation section.

The Widgets section is located inside the WP admin by going to Appearance > Widgets …

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets section in your browser …

Widgets Section

(Widgets Screen)

Let’s get started …

Add A Text Widget

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)

A text widget can be used to add lists of favorite items, ads, special promotions and more to your site … simply by typing in text or pasting HTML into the content area. You can also give the widget a title. Remember to save your settings when done …

A text widget is versatile

(A text widget is really versatile!)

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

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

Use A Text Widget To Add A Clickable Contact Button To Your Sidebar Area

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

Use A Text Widget To Add A Support Button To Your Sidebar Navigation Area

Step 1 – Upload your image.

To display the clickable image on your site, first you must upload the graphic image to your server’s images folder and note the path to your server’s image location.

For example …

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

You will use this information in Step 3.

For visitors to go to the contact page when the help button gets clicked, you will need to 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 – Create a destination page.

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

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

Step 3 – Create the code for your text widget.

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

Your code can be typed into a simple text editor and will look something like this …

Using A Text Widget To Add A Clickable Contact Button To The Sidebar Navigation 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 above with the URL of your image location.

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

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

Replace the above URLs and then copy the above code to your clipboard when finished.

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

Next, go back to your Widgets section …

Activate or deactivate widgets using drag-and-drop

(Widgets Area)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar in the location where your support button should display.

In the Available Widgets area, find a Text widget …

WordPress text widget

(Text widget)

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

Drag-and-drop your Text widget

(Drag-and-drop your WordPress text widget)

Step 5 – Configure the text widget settings.

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

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 URLs into the large text box, then click the save button …

Text widget

Important

Note: Make sure to check your contact page and button image links before pasting scripts into the Text Widget, or the clickable button won’t 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 paste in HTML code like we’re using in the example for this tutorial).

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

Automatically add paragraphs box not ticked

(Automatically add paragraphs option not ticked)

Here is some text with Automatically add paragraphs box ticked …

Automatically add paragraphs box ticked

(Automatically add paragraphs option checked)

***

Step 6 – Refresh the browser.

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

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

(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 links work. Test this by clicking on the button. You should be taken to your support page …

Test your text widget

(Test your text widget to make sure you’ve set up everything correctly)

Useful Tip

Useful Tips:

If you would like a new window to open up when visitors go to your support page (so they don’t leave the page they’re in), then change the text widget code from this:

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

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

Use A Text Widget To Add A Help Button To The Sidebar Area - 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 are wide and some are narrow. If your theme’s sidebar is narrower than the width of your button image, then you may have to either adjust the image size, 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)

Extra Tips:

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

How To Add WordPress Widgets To The Website

***

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

Click on this link to view Part 3:

***

"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