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 The SiteIn Part One of this tutorial series, we cover the basics of how to use widgets in WordPress.

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

How To Configure Commonly-Used WordPress Sidebar Widgets

By default, your site comes with a number of pre-installed widgets, such as widgets that let you display links to your site’s pages, recent posts, news items, adding tag clouds, etc.

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

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

Configuring Frequently-Used WordPress Widgets On The WordPress Sidebar Section: Step-By-Step Tutorial

In this tutorial, you will learn how to add, configure and reorder s number of widgets, including:

  • Adding a Contact Us button linking to your support page.
  • Adding a Categories section with a drop down menu.
  • Add a Recent Posts section to display your latest posts.
  • Add a list of Pages.
  • Display useful Links on your sidebar section.
  • Display the latest news using an RSS Feed section.
  • Adding a Tag Cloud section.
  • Add and configure an Archives section to the sidebar section.

To access the Widgets section go to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets panel in your web browser …

Widgets Section

(Widgets Screen)

Let’s get started …

Add A Text Widget To The Sidebar

Text widgets are quite useful …

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)

Text widgets can be used to add events, image links, tips and more to your site … just by typing in text or inserting HTML into the content area. You can also give the widget a title. Remember to save your settings when done …

Text widgets are versatile

(A text widget is really useful!)

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

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

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

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

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

Step 1 – Upload your image.

To display an image on your site, the button image must be uploaded to your server. Upload your image to your server and note down 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 the contact page when the help 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 your button graphic to this URL in Step 3

Step 2 – Add a destination page.

Create a contact page on your site and note the page URL …

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

Step 3 – Create 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 linking the graphic image to your contact page/helpdesk.

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

Add A Support Button To Your 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 code you need to replace with your actual contact details …

Use A Text Widget To Add A Support Button To The Sidebar Menu

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:

Now, go back to your Widgets screen …

Activate or deactivate widgets using drag & drop

(Widgets Area)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar in the location where your button should display.

In the Available Widgets area, select the Text widget …

WordPress text widget

(Text widget)

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

Drag and drop your WordPress text widget

(Dragging and dropping your Text widget)

Step 5 – Configure your text widget settings.

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 the text widget content area and click save …

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 links into the text area, then click Save when done …

Text widget

Info

Note: Make sure to test your contact page and image URLs before pasting scripts into the Text Widget, or your 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 code like we’re using in the example for this tutorial).

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

Automatically add paragraphs box not ticked

(Automatically add paragraphs box unchecked)

Here is some text with Automatically add paragraphs option checked …

Automatically add paragraphs option ticked

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh the web browser.

After adding your widget and HTML code, visit the front-end of your site and refresh the browser. If all links have been entered correctly, then the support button will display at the top of the site’s sidebar menu …

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

(Clickable support button widget on sidebar)

The screenshot above shows ’click for help’ button in the sidebar of a brand new WordPress site.

Step 7 – Test the button.

The final step is to ensure that your destination link works. Test this by clicking the support button. If you are taken directly to your support page, then the text widget has been set up correctly …

Test your text widget

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

Practical Tip

Useful Tips:

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

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

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

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

When inserting images into your sidebar menu, make sure that the width of the image does not exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. As we’ve previously explained, some themes may display different column widths depending on their templates and their layout. Some sidebars are wide and some are narrow. If the sidebar of your theme is narrower than the width of the button images, then you may have to either adjust the graphic size, or the width of your sidebar column to make elements display correctly on your sidebar section.

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

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

Additional 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 be left-aligned.
  • Link your contact button to any URL you like (e.g. to an external link, helpdesk, support forum, etc.) and change this anytime by editing the content in your widget.

Adding And Configuring Widgets On The WordPress Sidebar

***

This is the end of part two of this series of tutorials about using WordPress widgets.

To keep reading, click this link:

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com