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 widgets in WordPress.

In this section you will begin configuring a number of WordPress sidebar widgets.

Sidebar Widget Configuration

In a default WordPress installation, your site comes with a number of built-in widgets that can be used out of the box with minimal to no configuration needed, such as widgets for displaying links to your site’s pages, recent posts, newsfeeds, adding content search features, etc.

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

(By default, your site comes with several built-in widgets)

How To Set Up Sidebar Widgets: Step-By-Step Tutorial

In this tutorial, you will add, configure and reorder various widgets, including:

  • Add a clickable Contact Us image linking to your support page.
  • Add a Categories section.
  • Adding a Recent Posts section.
  • Adding a list of your site’s most important Pages.
  • Display a list of useful Links on your sidebar navigation area.
  • Displaying news items with an RSS Feed section.
  • Adding a Tag Cloud section.
  • Add and configure an Archives section to the sidebar.

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

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets section into your browser window …

Widgets Screen

(Widgets Screen)

Let’s get started …

Adding Text Widgets To The Sidebar Navigation Section

Text widgets are quite useful …

WordPress Text widget

(WordPress Text widget)

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 can be used to add notices, social media buttons, special promotions and more to your site … simply type in text or add 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 really versatile

(A text widget is really versatile!)

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

For this example, let’s set up a clickable support button on the sidebar navigation section that takes 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 your visitors can click on …

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

We’ll set up the clickable 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 Section

Step 1 – Upload your image.

To display the clickable button image on your site, the button image must be uploaded to your server. Upload the button image to your server and note the address of your image location.

E.g. …

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

This information will be used in Step 3.

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

Step 2 – Create the contact page.

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

Add A Contact Button To The Sidebar Section 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 button image to your contact page/helpdesk.

Your code can be written a simple text file and will look something like this …

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

  • 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 above with the URL of your image location.

The image below shows the sections of the above sample code that you need to replace with the actual contact page and image URLs …

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

Replace the above URLs and then copy all of the above code to your clipboard when finished.

If you need help understanding basic HTML code, refer to this tutorial:

Go back to your Widgets area …

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

In the Available Widgets area, find a Text widget …

Text widget

(Text widget)

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

Drag and drop your Text widget

(Dragging and dropping your WordPress text widget)

Step 5 – Configure your text widget settings.

Click on the widget title bar to configure the widget options. Paste the code with the links to your contact page and graphic button into your 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 Content area, then click the save button …

Text widget

Important Info

Note: Make sure to check your contact page and image URLs before pasting scripts into your Text Widget, or your button won’t work.

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

If adding text with no 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 formatted HTML content like we’re doing in this tutorial).

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

Automatically add paragraphs box unchecked

(Automatically add paragraphs option not selected)

Here is some text with Automatically add paragraphs box checked …

Automatically add paragraphs option ticked

(Automatically add paragraphs box selected)

***

Step 6 – Refresh the web browser.

Once you have added the text widget and formatted content, visit your site and refresh your web browser. If all links have been entered correctly, then the clickable support button should display in your sidebar menu …

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

(Clickable button widget on sidebar)

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

Step 7 – Test your button.

The final step is to ensure that the links work. Test the button to make sure that your visitors will go to your help page when clicking the graphic image. You should be taken to your support page …

Test the text widget

(Test the clickable button)

Useful Tip

Tips:

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

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

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

Use A Text Widget To Add A Support Button To Your Sidebar Navigation Menu - open in new window

When inserting images into your sidebar section, 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 mentioned earlier, 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 graphic images, then you may need to either adjust the image size, or the width of your sidebar column to make images display correctly on your theme.

Adjust column width or reduce image size

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

More Tips:

  • If you don’t want the image to be centered 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.
  • Link your contact button to any URL you like (e.g. to an external site, contact form, support forum, etc.) and change this anytime by editing the links in the text widget.

Adding WordPress Widgets To The Sidebar

***

This is the end of section two of this series of tutorials about how to use WordPress widgets.

To continue reading, click here:

***

"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com