How To Use And Configure WordPress Widgets – Part 2

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

How To Use WordPress WidgetsIn Part 1 of this tutorial series, we explained the basics of using widgets in WordPress.

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

How To Configure Commonly-Used WordPress Widgets

By default, your site comes with several pre-installed active widgets, such as widgets that let you display links to your pages, recent posts, text or HTML banners, adding tag clouds, etc.

By default, your site comes with several preinstalled widgets

(In a default WordPress installation, your site comes with several active widgets)

How To Set Up Frequently-Used Widgets On Your WordPress Sidebar: Step-By-Step Tutorial

In this tutorial, you are going to learn how to add, configure and reorder various widgets, including:

  • Adding a clickable Help image linking to your help page.
  • Adding a Categories section.
  • Adding a Recent Posts section to display your latest posts.
  • Adding a list of the site’s most important Pages.
  • Display useful Links on the sidebar navigation area.
  • Adding an RSS Feed section.
  • Adding tag links through a Tag Cloud section.
  • Configure how your Archived Posts display on the sidebar navigation area.

The Widgets screen is located inside the WordPress administration area and can be accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This opens the Widgets screen in your browser window …

Widgets Panel

(Widgets Panel)

Let’s get started …

Add A Text Widget To The Sidebar

Text widgets are quite useful …

WordPress Text widget

(Text widget)

Important 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 let you insert just about anything you want into the sidebar area or other widget sections, such as lists of favorite items, ads, reviews and more to your site … just type in text or add HTML into the content area. You can also add an optional title in the Title field. Remember to save your settings when done …

A text widget is extremely versatile

(A text widget is versatile!)

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

For this example, let’s set up a clickable contact button on the sidebar navigation section 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 Contact Button To Your Sidebar Navigation Menu Using A Text Widget

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

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

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 help button is clicked, you will need to 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 – Create a support page.

Create a contact page and note its URL …

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

Step 3 – Compose your text widget code.

If you’re not a technical-minded person, don’t worry … this sounds a lot more technical than it is. In simple terms, you just need to create the instructions linking the graphic image to the contact page.

Your code can be typed into a plain text editor and will look something like this …

Add A Help Button To Your Sidebar 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 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 page and image URLs …

Add A Clickable Support Button To Your Sidebar Navigation 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, refer to this tutorial:

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 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 very top of the Widget Area

Dragging and dropping your Text widget

(Dragging and dropping your WordPress text widget)

Step 5 – Configure the text widget settings.

Click on the Text widget title bar to configure the widget 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 …

WordPress text widget

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

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 you’re adding text without 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’re typing in code like we’re doing in this tutorial).

Here is some text with Automatically add paragraphs option not ticked …

Automatically add paragraphs box not checked

(Automatically add paragraphs option not checked)

Here is some text with Automatically add paragraphs option selected …

Automatically add paragraphs option selected

(Automatically add paragraphs option selected)

***

Step 6 – Refresh the web browser.

After adding your text widget and HTML content, visit your site and refresh the browser. If all links have been entered correctly, then your clickable support button will display at the top of the sidebar menu …

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

(Clickable button widget on blog sidebar)

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

Step 7 – Test your widget.

The final step is to ensure that your destination link works. Test this by clicking on the support button. You should be taken to your contact page …

Test the text widget

(Test your clickable button)

Useful Tip

Useful Tips:

If you want the contact page to display inside a new window when visitors click on the help (so they don’t leave the page they’re on), then change the button code from this:

Add A Support Button To Your Sidebar Menu Using A Text Widget

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

Add A Support Button To The Sidebar Menu Using A Text Widget - 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 can display elements differently depending on their templates and their layout. Some sidebars are wide and some are narrow. If your theme’s sidebar is narrower than the width of the graphic images, then you may have to either adjust the graphic size, or the column width to make images display correctly on your theme.

Adjust column width or reduce image size

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

More Tips:

  • If you don’t want the button image to be centered inside your 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).
  • You can link your help button to any URL you want (e.g. to an external site, helpdesk, forum, etc.) and change this anytime by editing the code in your text widget.

How To Add And Configure Widgets In The WordPress Sidebar Area

***

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

To continue, click this link:

***

"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya