How To Use And Configure WordPress Widgets – Part 2

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

Adding And Configuring WordPress Widgets In The SidebarIn Part One of this step-by-step tutorial, we explained the basics of using WordPress widgets.

In this section you are going to configure various WordPress widgets.

How To Configure Commonly-Used WordPress Sidebar Widgets

In a default WordPress installation, your site comes with several pre-installed widgets that can be used out of the box with minimal to no configuration required, such as widgets that let you display links to your pages, recent posts, RSS feed content, adding a search box, etc.

By default, your site comes with a number of preinstalled widgets

(By default, your site comes with a number of pre-installed widgets)

Adding Frequently-Used Widgets To Your Blog Sidebar Section: Tutorial

In this step-by-step tutorial series, we will add, configure and reorder s number of WordPress widgets to display in your site’s sidebar, including:

  • Adding a clickable Help image linking to your support page.
  • Adding a Categories section.
  • Add a Recent Posts section to display the latest posts.
  • Adding a list of the site’s Pages.
  • Display useful Links on the sidebar navigation area.
  • Displaying news items with an RSS Feed section.
  • Adding a list of clickable tags with a Tag Cloud.
  • Configure how Archived Posts display on the sidebar menu.

To access the Widgets panel log into the admin and go to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This opens the Widgets section in your web browser …

Widgets Panel

(Widgets Screen)

Let’s start to configure some widgets …

Text Widgets

Text widgets are incredibly versatile …

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)

A text widget lets you insert just about anything you want into the sidebar area or other widget sections, such as article snippets, image links, reviews and more to your site … simply 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 …

Text widgets are extremely versatile

(A text widget is really versatile!)

Example: Add A Support Button To The Sidebar Section Using A Text Widget

For this example, let’s set up a contact button on the sidebar navigation menu 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 you can use on your own site …

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

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

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

Step 1 – Upload your image.

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

For example …

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

This information will be used in Step 3.

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

Step 2 – Add your contact page.

Create a contact page and note down its URL …

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

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

Your code can be typed in a plain text editor and should look something like this …

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

  • 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 above with the URL of your image location.

The image below shows which sections of the above sample code you will need to replace with your actual contact details …

Use A Text Widget To Add A Contact 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 figuring out basic HTML code, see this tutorial:

Next, go back into your Widgets panel …

Activate or deactivate widgets using drag-and-drop

(Widgets Panel)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar where you want the button to display.

In the Available Widgets area, find a Text widget …

Text widget

(Text widget)

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

Dragging and dropping your Text widget

(Drag-and-drop your WordPress text widget)

Step 5 – Configure your text widget.

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

Text widget

Add a title to your widget if you want (e.g. “Need Help?”, “Get Support”, etc.) and paste the code with the correct destination URLs into the large text box, then click the save button …

Text widget

Important Info

Note: Make sure to test all links before pasting scripts into the Text Widget, or your button will not work.

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

If 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 HTML code like we’re using in the example for this tutorial).

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

Automatically add paragraphs option not ticked

(Automatically add paragraphs option not selected)

Here is some text with Automatically add paragraphs box ticked …

Automatically add paragraphs option ticked

(Automatically add paragraphs option selected)

***

Step 6 – Refresh your web browser.

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

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

(Clickable button widget on sidebar)

The above screenshot shows the support contact button added to a newly-installed WordPress site.

Step 7 – Test your widget.

The last step is to ensure that your clickable button works. Test this by clicking on the graphic button. You should be taken to your contact page …

Test the text widget

(Test the text widget)

Practical Tip

Text Widgets – Useful 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 in), then change the text widget code from this:

Add A Clickable Help Button To The Sidebar Menu Using A Text Widget

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

Add A Clickable Contact Button To The Sidebar Area Using A Text Widget - open in new window

When adding images to your sidebar area, make sure that the width of the image doesn’t exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. As we’ve previously mentioned, some themes can display elements differently depending on their templates and layout. Some sidebars are wide and some are narrow. If the sidebar of your theme is narrower than the width of your graphic image, then you may have to either adjust the image size, or the column width to make elements display correctly on your sidebar.

Make sure 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 to center the button inside your sidebar, delete the <center> and </center> tags from the beginning and end of the code. The image will then be left-aligned.
  • You can link the help button to any destination you like (e.g. to an external link, helpdesk, forum, etc.) and change this anytime by replacing the content inside the text widget.

How To Add And Configure Widgets In WordPress

***

This is the end of part 2 of this series of tutorials.

Click here to continue:

***

"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now