How To Use And Configure WordPress Widgets – Part 2

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

Configuring Widgets On Your WordPress Sidebar Navigation AreaIn Part One of this step-by-step tutorial, we cover the basics of how to use widgets in WordPress.

In this section you will learn how to configure a number of commonly-used WordPress widgets.

Widget Configuration

In a default WordPress installation, your site comes with several preinstalled widgets, such as widgets that let you display links to your pages, recent posts, text or HTML banners, filter content by publish dates, etc.

In a default WordPress installation, your site comes with a number of preinstalled widgets

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

How To Configure Frequently-Used WordPress Sidebar Widgets: Step-By-Step Tutorial

In this step-by-step tutorial, you are going to learn how to add, configure and reorder s number of WordPress widgets, including:

  • Adding a Contact Us graphic linking visitors to the contact details page.
  • Add a Categories section.
  • Adding a Recent Posts section.
  • Add a list of the site’s most important Pages.
  • Display a list of useful Links on your sidebar.
  • Add an RSS Feed section.
  • Add a list of clickable tags through a Tag Cloud section.
  • Add and configure an Archives section to your sidebar.

To access the Widgets panel log into your WordPress dashboard and go to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings you to the Widgets screen in your browser window …

Widgets Screen

(Widgets Panel)

Let’s get started …

Text Widgets

Text widgets are incredibly useful …

Text widget

(WordPress 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)

A text widget lets you insert just about anything you want into the sidebar or other widget sections, such as email and contact information, ads, tips and more to your site … simply type in text or paste HTML into the content area. You can also give the widget a title. Remember to save your settings when done …

A text widget is really versatile

(Text widgets are versatile!)

Example: Add A Contact Button To The Sidebar Area Using A Text Widget

For this example, let’s set up a help button on the sidebar section 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 “help button” graphic image that you will want your visitors to click on …

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

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

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

Step 1 – Upload your image.

Upload the image to your server’s images folder and note the address of your image location.

For example …

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

You will use this information in Step 3.

In order for visitors to go to your contact page when the graphic button gets clicked, 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 graphic to this URL in Step 3

Step 2 – Add the support page.

Create a contact page and note down its URL …

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

Step 3 – Compose the code for your text widget.

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

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

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

  • 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 the sections of the above code that you need to replace with your actual web addresses …

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

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 to your Widgets screen …

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 your support button to display.

In the Available Widgets area, select a Text widget …

Text widget

(Text widget)

Drag the 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 the text widget.

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

Text widget

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

Text widget

Important Info

Note: Remember to check your contact page and 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, 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 with Automatically add paragraphs box unchecked …

Automatically add paragraphs box not selected

(Automatically add paragraphs box not checked)

Here is some text with Automatically add paragraphs option ticked …

Automatically add paragraphs box selected

(Automatically add paragraphs option checked)

***

Step 6 – Refresh your web browser.

After adding your widget and HTML content, visit the front end of your site and refresh the browser. If all links have been entered correctly, then your clickable support button should display in the sidebar menu …

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

(Clickable button widget on blog sidebar)

The above screenshot shows a clickable button added to a newly-installed WordPress site.

Step 7 – Test your widget.

The last step is to make sure that the links work. Test this by clicking on the button. If you are taken directly to the contact page, then the text widget has been set up correctly …

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

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

Tip

Tips:

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

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

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

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

When adding images to your sidebar section, make sure that the width of your image does not 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 their layout. Some sidebars may be wider or narrower. 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

(Adjust column width or reduce image size)

Additional Tips:

  • If you don’t want to center the button image in the sidebar, delete the <center> and </center> tags from the beginning and end of the HTML code. The image will then be aligned to its default settings (normally left-aligned).
  • Link your support button to any URL you want (e.g. to an external site, contact form, forum, etc.) and change this anytime by replacing the links in your widget.

Using Widgets In WordPress

***

This is the end of part 2 of this tutorial series about how to use WordPress widgets.

To continue, 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