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 The BlogIn Part One of this step-by-step tutorial series, we cover the basics of how to use widgets in WordPress.

In this section you will learn how to begin configuring a number of WordPress sidebar widgets.

Sidebar Widget Configuration

In a default WordPress installation, your site comes with a number of built-in active widgets, such as widgets that let you display links to your pages, recent posts, text or HTML banners, adding a search box, etc.

By default, your site comes with several preinstalled widgets

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

How To Configure Sidebar Widgets In WordPress In WordPress: Tutorial

In this step-by-step tutorial, we will add, configure and reorder s number of widgets, including:

  • Adding a Support Contact graphic button linking visitors to the contact details page.
  • Add a Categories section with a drop down menu.
  • Add a Recent Posts section to display your latest posts.
  • Adding a list of your site’s most important Pages.
  • Display useful Links on the sidebar section.
  • Adding an RSS Feed section.
  • Adding a Tag Cloud.
  • Add and configure an Archives section to your sidebar.

To access the Widgets area go to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets screen in your web browser …

Widgets Screen

(Widgets Screen)

Let’s begin by learning how to configure text widgets …

Add A Text Widget

Text widgets are incredibly versatile …

WordPress Text widget

(Text widget)

Useful 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 can be used to add quotes, social media buttons, tips and more to your site … just type in text or insert HTML into the content area. You can also give the widget a title. Remember to save your settings when done …

Text widgets are really versatile

(Text widgets are versatile!)

Example: Use A Text Widget To Add A Clickable Help Button To Your Sidebar Navigation Area

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 …

Add A Help Button To Your Sidebar Navigation Area Using A Text Widget

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

Use A Text Widget To Add A Help Button To The Sidebar Navigation Menu

Step 1 – Upload your image.

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

For example …

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

This information will be used in Step 3.

For visitors to go to the contact page when they click on the help button, 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 – Add your contact page.

Create a contact page and note down its URL …

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

Step 3 – Create 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 button image to your contact page/helpdesk.

Your instructions can be typed into a plain text editor and should look something like this …

Use A Text Widget To Add A Contact Button To Your 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 image below shows the sections of the above sample code that you need to replace with your actual contact details …

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

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:

Now, go back into your Widgets area …

Activate or deactivate widgets using drag & drop

(Widgets Screen)

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 a Text widget …

Text widget

(WordPress text widget)

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

Drag-and-drop your Text widget

(Drag and drop your Text widget)

Step 5 – Configure your text widget.

Click on the Text 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 …

WordPress text widget

Add a title to the 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 the save button …

WordPress text widget

Important Info

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

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

If adding text without formatting tags, 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 HTML content like we’re doing in this tutorial).

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

Automatically add paragraphs option not selected

(Automatically add paragraphs box not checked)

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

Automatically add paragraphs box checked

(Automatically add paragraphs box selected)

***

Step 6 – Refresh your browser.

After adding the text widget and content, go to the front-end of your site and refresh your browser. If all links have been entered correctly, then your clickable support button will display in your sidebar menu …

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

(Clickable 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 widget.

The final step is to ensure that the clickable button works. Test your button to make sure that your visitors will go to the support page when they click on the graphic image. If you are taken to the support page, then the text widget has been set up correctly …

Test the clickable button to make sure you've set everything up correctly

(Test your clickable button)

Useful Tip

Useful Tips:

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

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

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

Use A Text Widget To Add A Help Button To The Sidebar Menu - open in new window

When choosing images to add to your sidebar section, make sure that the width of the image doesn’t exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. Note that some themes can display elements differently depending on their templates and their layout. Some sidebars may be too wide or too narrow. If your theme’s sidebar width is narrower than the width of the button images, then you may have to either adjust the size of your images, or the width of your sidebar column to make the images display correctly on your sidebar.

Adjust column width or reduce image size

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

Extra Tips:

  • If you don’t want the image to be centered inside your 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).
  • You can link your support button to any destination you like (e.g. to an external link, contact form, support forum, etc.) and change this anytime by replacing the links in the widget.

How To Add And Configure WordPress Widgets In Your Sidebar Navigation Menu

***

This is the end of section two of this tutorial series about how to use Widgets.

To view Part Three, click this link:

***

"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie