How To Use And Configure WordPress Widgets – Part 2

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

Adding WordPress Widgets To Your SiteIn Part 1 of this tutorial series, we explained the basics of how to use widgets in WordPress.

In this section you are going to learn how to begin configuring various widgets in WordPress.

Configuring Sidebar Widgets

In a default WordPress installation, your site comes with several built-in widgets that can be used out of the box with minimal to no configuration needed, such as widgets for displaying external links, recent posts, newsfeeds, add a search box, etc.

In a default WordPress installation, your site comes with a number of pre-installed widgets

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

How To Add Widgets To The Blog Sidebar Section: Tutorial

In this step-by-step tutorial, we are going to add, configure and reorder s number of widgets to display in your site’s sidebar navigation area, including:

  • Add a clickable Support Contact graphic button linking to the support page.
  • Add a Categories section.
  • Adding a Recent Posts section to display the latest posts.
  • Add a list of the site’s most important Pages.
  • Display Links on your sidebar.
  • Adding an RSS Feed section.
  • Add tags to the sidebar through a Tag Cloud.
  • Adding and configuring an Archives section to your sidebar.

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

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets panel in your browser …

Widgets Section

(Widgets Panel)

Let’s start configuring your widgets …

Add A Text Widget

Text widgets are incredibly useful …

Text widget

(WordPress 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 your sidebar navigation menu or other widget sections, such as events, social media buttons, tips and more to your site … just by typing in text or inserting HTML into the content area. You can also give the widget a title. Remember to save your settings …

A text widget is very useful

(Text widgets are versatile!)

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

For this example, we’ll set up a contact button on the sidebar 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 Clickable Help Button To Your Sidebar Section Using A Text Widget

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

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

Step 1 – Upload your image.

Upload the graphic image to the images folder in your server 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 be taken to the 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 your button graphic to this URL in Step 3

Step 2 – Add a destination page.

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

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

Step 3 – Compose the 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 for your clickable button.

Your instructions can be typed in a plain text file and will look something like this …

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

  • 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 code you will need to replace with your actual contact page and image URLs …

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

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

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

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

In the Available Widgets area, find the Text widget …

Text widget

(Text widget)

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

Drag and drop your Text widget

(Drag and drop your WordPress text widget)

Step 5 – Configure your 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 heading to your widget if you want (e.g. “Need Help?”, “Get Support”, etc.) and paste the code with the correct destination URLs into the text area, then click Save when done …

WordPress text widget

Info

Note: Remember to check your contact page and button image links before pasting scripts into the Text Widget, or your 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 paragraphs (note: not required if you paste in code 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 box unchecked

(Automatically add paragraphs box unchecked)

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

Automatically add paragraphs box selected

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh the web browser.

Once you have added your widget and HTML code, go to your site and refresh your web browser. If all links have been entered correctly, then the clickable support button will display in the sidebar menu …

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

(Clickable support button widget on sidebar)

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

Step 7 – Test the widget.

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

Test your clickable button

(Test the clickable button to make sure you’ve set everything up correctly)

Tip

Tips:

If you would like a new browser window to open up when visitors click on the help button (so they don’t leave the page they’re on), then change the text widget code from this:

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

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

Use A Text Widget To Add A Clickable Contact Button To The Sidebar Section - open in new window

When adding images to your sidebar navigation area, make sure that the width of your image does not 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 your button images, then you may have to either adjust the graphic size, or the column width to make graphics display correctly on your sidebar.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

Additional Tips:

  • If you don’t want the button image to be centered in the sidebar, delete the <center> and </center> tags from the beginning and end of the line of code. The image will then be aligned to its default settings (normally left-aligned).
  • Link the help button to any destination you want (e.g. to an external link, contact form, FAQ page, etc.) and change this anytime by replacing the content inside the text widget.

Adding Widgets To The Sidebar

***

This is the end of section two of this tutorial about how to use WordPress widgets.

To view the rest of this tutorial, 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