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 And Configure Widgets In WordPressIn Part One of this step-by-step tutorial, we explained the basics of how to use WordPress widgets.

In this tutorial you will learn how to begin configuring various sidebar widgets in WordPress.

Configuring Commonly-Used WordPress Sidebar Widgets

In a default WordPress installation, your site comes with several preinstalled widgets, such as widgets that let you display external links, filter posts by categories, newsfeeds, add tag clouds, etc.

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

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

Configuring Commonly-Used WordPress Sidebar Widgets: Step-By-Step Tutorial

In this tutorial series, we will add, configure and reorder a number of commonly-used WordPress widgets, including:

  • Adding a clickable Support Contact button linking to your contact details page.
  • Adding a Categories section.
  • Adding a Recent Posts section.
  • Adding a list of your site’s Pages.
  • Display useful Links on your sidebar.
  • Adding an RSS Feed section.
  • Add a Tag Cloud.
  • Configure how Archived Posts display on the sidebar navigation section.

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

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets section in your browser window …

Widgets Panel

(Widgets Panel)

Let’s start by configuring WordPress text widgets …

Adding Text Widgets

Text widgets are quite useful …

WordPress Text widget

(Text widget)

Useful Information

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 can be used to add comments, images, tips and more to your site … simply type in text or insert 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 useful!)

Example: Use A Text Widget To Add A Help Button To The Sidebar Navigation Area

For this example, we’ll set up a support button on your sidebar navigation area that will take 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 your visitors can click on …

Use A Text Widget To Add A Clickable Help Button To Your Sidebar Navigation Area

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

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

Step 1 – Upload your image.

Upload the graphic image to your server and note down the URL pointing to your server’s image location.

For example …

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

You will need this information in Step 3.

In order for visitors to be taken to your contact page when the graphic button gets clicked, either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link the button graphic to this URL in Step 3

Step 2 – Create the destination page.

Create a contact page and note its URL …

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

Step 3 – Create your text widget code.

If you’re not a technical-minded person, don’t worry … this sounds a lot more technical than it is. Basically, you just need to create the instructions for your clickable image.

Your instructions can be written a simple text editor and should look something like this …

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

  • 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 screenshot 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 Clickable Contact Button To Your 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 understanding basic HTML code, see this tutorial:

Next, go back to your Widgets screen …

Activate or deactivate widgets using drag-and-drop

(Widgets Screen)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar where you would like your button to display.

In the Available Widgets area, select a Text widget …

WordPress text widget

(WordPress text widget)

Drag your Text widget to your 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 settings.

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

WordPress text widget

Add a heading to the widget if you want (e.g. “Need Help?”, “Support”, etc.) and paste the code with the correct URLs into the Content box, then click Save when done …

Text widget

Useful Info

Note: Remember to check all URLs before pasting scripts into your Text Widget, or the button will not work.

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

If 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 paste in HTML code like we’re doing in this tutorial).

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

Automatically add paragraphs box unchecked

(Automatically add paragraphs option not selected)

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

Automatically add paragraphs box selected

(Automatically add paragraphs option checked)

***

Step 6 – Refresh your browser.

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

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

(Clickable support button widget on sidebar)

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

Step 7 – Test your widget.

The last step is to make sure that the destination URL works. Test your button to make sure that your visitors will go to the help page when clicking the graphic image. You should be taken directly to your contact page …

Test your text widget to ensure it works

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

Useful Tip

Tips:

If you would like your contact page to display in 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 Help Button To The Sidebar Navigation Section Using A Text Widget

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

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

When inserting images into your sidebar navigation 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. Note that some themes may display elements differently depending on their templates and layout. Some sidebars may be too wide or too narrow. If the sidebar of your theme is narrower than the width of the button image, then you may have to either adjust the size of your images, or the column width to make images display correctly on your sidebar section.

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

(Adjust column width or reduce image size)

Additional Tips:

  • If you don’t want to center your image inside the sidebar, delete the <center> and </center> tags from the beginning and end of the code. The image will then be left-aligned.
  • Link the support button to any URL you want (e.g. to an external link, helpdesk, FAQ page, etc.) and change this anytime by editing the content in your widget.

Adding WordPress Widgets To Your Sidebar

***

This is the end of section 2 of this tutorial series.

To keep reading, click here:

***

"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum