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

In this tutorial you are going to begin configuring several sidebar widgets in WordPress.

Configuring Sidebar Widgets

By default, your site comes with several built-in widgets, such as widgets that let you display links to your site’s pages, filter posts by categories, RSS feed content, adding a search box, etc.

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

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

How To Set Up Frequently-Used Widgets On Your Blog Sidebar Section: Tutorial

In this step-by-step tutorial series, you will add, configure and reorder various frequently-used widgets to display in the site’s sidebar, including:

  • Add a clickable Help image linking to your support page.
  • Add a Categories section with a drop down menu.
  • Add a Recent Posts section.
  • Add a list of the site’s main Pages.
  • Display Links on your sidebar.
  • Add an RSS Feed section.
  • Add clickable tags through a Tag Cloud section.
  • Adding and configuring an Archives section to your sidebar.

To access the Widgets section log into the WordPress administration and go to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets area into your browser …

Widgets Panel

(Widgets Panel)

Let’s begin to configure some widgets …

Adding Text Widgets To The Sidebar Section

Text widgets are versatile …

WordPress Text widget

(Text widget)

Important

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

A text widget is really useful

(A text widget is really versatile!)

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

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

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

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

Add A Help 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 the button graphic to a folder on your server and note the path to your image location.

For example …

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

This information will be used in Step 3.

In order for someone to be taken to your contact page when they click on the help 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 your button graphic to this URL in Step 3

Step 2 – Create a destination page.

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

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

Step 3 – Create the HTML 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 linking your button image to the destination URL.

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

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

  • 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 code you will need to replace with your actual web addresses …

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

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

Now, go back into 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 clickable button should display.

In the Available Widgets area, select the Text widget …

WordPress text widget

(Text widget)

Drag the Text widget to the 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 Text widget)

Step 5 – Configure the text widget settings.

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

Text widget

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

WordPress text widget

Important

Note: Remember to check your contact page and button image links before pasting scripts into the Text Widget, or the button won’t work.

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

If you’re adding text without 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: this is not necessary 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 selected …

Automatically add paragraphs option not ticked

(Automatically add paragraphs option not selected)

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

Automatically add paragraphs box checked

(Automatically add paragraphs option ticked)

***

Step 6 – Refresh the browser.

After adding the text widget and formatted content, 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 sidebar menu …

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

(Clickable support button widget on blog sidebar)

The screenshot above shows the support button added to a brand new WordPress site.

Step 7 – Test your button.

The last step is to make sure that your destination URL works. Test your button to make sure that visitors will go to your contact page when clicking the graphic image. If you are taken directly to your contact page, then everything has been set up correctly …

Test your text widget

(Test your text widget)

Useful Tip

Useful Tips:

If you would like your contact page to display inside a new window when visitors click on the support (so they don’t leave the page they’re in), then change the code from this:

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

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

Use A Text Widget To Add A Contact Button To Your Sidebar Navigation Area - 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 may display elements differently depending on their templates and their layout. Some sidebars may be wider or narrower. If the sidebar of your theme is narrower than the width of the button images, then you may have to either adjust the image size, or the column width to make graphics display correctly on your sidebar area.

Adjust column width or reduce image size

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

Extra Tips:

  • If you don’t want your button image 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 help button to any destination you want (e.g. to an external site, helpdesk, forum, etc.) and change this anytime by replacing the content in your widget.

How To Add And Configure WordPress Widgets In Your Sidebar Section

***

This is the end of section 2 of this tutorial series about using WordPress widgets.

Click on this link to read the rest of this tutorial:

***

"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum