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

In this section we are going to show you how to configure several sidebar widgets in WordPress.

Configuring Sidebar Widgets

By default, your site comes with several preinstalled widgets, such as widgets that let you display links to your pages, recent posts, RSS feed content, adding search features, 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 a number of pre-installed widgets)

How To Set Up Commonly-Used WordPress Widgets On The Blog Sidebar Section: Step-By-Step Tutorial

In this step-by-step tutorial series, we will add, configure and reorder various widgets, including:

  • Adding a clickable Help graphic linking to your support page.
  • Add a Categories section.
  • Add a Recent Posts section.
  • Add a list of the site’s main Pages.
  • Display important Links on your sidebar.
  • Displaying news items using an RSS Feed section.
  • Add tags to the sidebar section through a Tag Cloud section.
  • Configure how Archived Posts display on your sidebar navigation area.

The Widgets section is located inside your WordPress admin by going to Appearance > Widgets …

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets section in your browser …

Widgets Section

(Widgets Panel)

Let’s get started …

Add A Text Widget To The Sidebar

Text widgets are incredibly versatile …

Text widget

(WordPress Text widget)

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 article snippets, image links, news and updates and more to your site … just type in text or add HTML into the content area. You can also give the widget a title. Remember to save your settings when done …

A text widget is very useful

(A text widget is really useful!)

Example: Use A Text Widget To Add A Clickable Contact Button To Your Sidebar Navigation Menu

For this example, we’ll set up a clickable contact button on your sidebar navigation area 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 your visitors can click on …

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

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

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

Step 1 – Upload your image.

Upload the image to your server and note the URL pointing to your image location.

For example …

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

You will need this information in Step 3.

For visitors to go to the contact page when the support button is clicked, either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will then link the button image to this URL in Step 3 …

Step 2 – Add the support page.

Create a contact page and note its URL …

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

Step 3 – Compose your text widget code.

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

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

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

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

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

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

If you need help figuring out basic HTML code, see this tutorial:

Now, go back to your Widgets area …

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 button should display.

In the Available Widgets area, select the Text widget …

WordPress 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 WordPress text widget

(Dragging and dropping your Text widget)

Step 5 – Configure your widget settings.

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

Text widget

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

WordPress text widget

Useful Info

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

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

If adding text with no formatting tags, you may want to tick the Automatically add paragraphs box to wrap each block of text in paragraphs (note: not required if you type in formatted HTML code like we’re using in the example for this tutorial).

Here is some text with Automatically add paragraphs option unchecked …

Automatically add paragraphs box not checked

(Automatically add paragraphs box unchecked)

Here is some text with Automatically add paragraphs option checked …

Automatically add paragraphs box ticked

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh the web browser.

Once you have added the text widget and HTML code, visit the front-end of your site and refresh your browser. If all links have been entered correctly, then the support button will display in your sidebar menu …

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

(Clickable button widget on blog sidebar)

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

Step 7 – Test the button.

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

Test the text widget to make sure you've set up everything correctly

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

Useful Tip

Text Widgets – Useful Tips:

If you want your support page to open inside a new window when visitors click on the help (so they don’t leave the page they’re in), then change the text widget code from this:

Use A Text Widget To Add A Contact Button To The Sidebar Navigation Section

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

Using A Text Widget To Add A Clickable Support Button To The Sidebar Navigation Menu - open in new window

When choosing images for your sidebar section, 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 elements differently 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 images, then you may have to either adjust the size of your images, or the width of your sidebar column to make graphics display correctly on your sidebar section.

Make sure that the image width does not exceed the sidebar column width

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

Extra Tips:

  • If you don’t want your button 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 align to the left.
  • Link the support button to any destination you want (e.g. to an external site, contact form, forum, etc.) and change this anytime by replacing the code inside the widget.

Adding WordPress Widgets To The Site

***

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

Click on this link to continue:

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)