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

In this section you are going to learn how to begin configuring various frequently-used WordPress sidebar widgets.

How To Configure Sidebar Widgets

By default, your site comes with several built-in widgets, such as widgets that let you display links to your pages, filter posts by categories, text or HTML banners, adding a search box, etc.

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

(By default, your site comes with a number of built-in widgets)

How To Add Sidebar Widgets In WordPress: Step-By-Step Tutorial

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

  • Add a clickable Support graphic linking to your support page.
  • Add a Categories section.
  • Add a Recent Posts section.
  • Add a list of the site’s most important Pages.
  • Display important Links on the sidebar.
  • Add an RSS Feed section.
  • Add a Tag Cloud.
  • Configure how your Archived Posts display on your sidebar.

The Widgets section is located inside the WordPress admin area and can easily be accessed from the dashboard menu by clicking on Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

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

Widgets Panel

(Widgets Section)

Let’s get started …

Adding 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 your sidebar navigation section or other widget sections, such as policies, social media buttons, forms and more to your site … simply type in text or paste HTML into the widget content area. You can also add an optional title in the Title field. Remember to save your settings when done …

Text widgets are versatile

(A text widget is very useful!)

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

For this example, we’ll set up a contact button on the sidebar 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, create or source a “help button” graphic image that your visitors can click on …

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

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

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

Step 1 – Upload your image.

To display the image on your site, first you must upload the graphic image to your server and note the path to your image location.

For example …

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

This information will be required in Step 3.

In order for visitors to go to the contact page when they click on the support 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 support page.

Create a contact page on your site and note down its URL …

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

Step 3 – Compose the code for your text widget.

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 your destination URL.

Your code can be typed into a simple text file and should look something like this …

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

  • 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 need to replace with the actual contact page and image URLs …

Add A Contact Button To Your Sidebar Menu 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:

Next, go back to your Widgets section …

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

Text widget

(Text widget)

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

Dragging and dropping your Text widget

(Dragging and dropping your WordPress text widget)

Step 5 – Configure the widget.

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

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 links into the large text box, then click the save button …

WordPress text widget

Important Info

Note: Make sure to test all URLs before pasting scripts into your Text Widget, or your clickable button won’t work.

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

If you’re adding text with no formatting tags like paragraph breaks, you may want to tick the Automatically add paragraphs box to wrap each block of text in paragraphs (note: this is not necessary if you type in formatted 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 ticked)

Here is some text with Automatically add paragraphs box selected …

Automatically add paragraphs box selected

(Automatically add paragraphs option selected)

***

Step 6 – Refresh your web browser.

After adding your widget and formatted content, go to your site and refresh your web browser. If all links have been entered correctly, then the support button should display in your sidebar menu …

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

(Clickable support button widget on blog sidebar)

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

Step 7 – Test your widget.

The final step is to ensure that the clickable button works. Test your button to make sure that your visitors will go to your help page when they click on the graphic image. You should be taken directly to the support page …

Test the text widget to ensure it works

(Test your text widget to make sure you’ve set everything up correctly)

Useful Tip

Tips:

If you would like the contact 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:

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

To this (i.e. include the section that says: target=”_blank” in the code):

Add A Support Button To Your Sidebar Area Using A Text Widget - open in new window

When inserting images into your sidebar navigation section, make sure that the width of your image doesn’t exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. Note that some themes may display different column widths depending on their templates and layout. Some sidebars may be too wide or too 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.

Adjust column width or reduce image size

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

Extra Tips:

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

Using WordPress Widgets

***

This is the end of section 2 of this tutorial.

To view Part Three, click here:

***

"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