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

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

Sidebar Widget Configuration

By default, your site comes with several built-in widgets that can be used out of the box with minimal to no configuration needed, such as widgets that let you display links to your pages, filter posts by categories, text or HTML banners, add tag clouds, etc.

By default, your site comes with several preinstalled widgets

(In a default WordPress installation, your site comes with several pre-installed widgets)

Adding And Configuring Sidebar Widgets: Tutorial

In this tutorial, we are going to add, configure and reorder various widgets, including:

  • Adding a Support Contact graphic linking to the help page.
  • Add a Categories section with a drop down menu.
  • Add a Recent Posts section.
  • Adding a list of the site’s Pages.
  • Display useful Links on your sidebar navigation area.
  • Add an RSS Feed section.
  • Add a list of clickable tags through a Tag Cloud section.
  • Add and configure an Archives section to the sidebar.

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

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This opens the Widgets area in your browser window …

Widgets Screen

(Widgets Panel)

Let’s begin to configure your widgets …

Text Widgets

Text widgets are versatile …

WordPress Text widget

(WordPress 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 can be used to add instructions, images, news and updates 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 …

A text widget is really versatile

(A text widget is extremely versatile!)

Example: Add A Clickable Support Button To The Sidebar Area Using A Text Widget

For this example, let’s set up a help button on your sidebar 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, create or source a graphic image that visitors can click on …

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

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

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

Step 1 – Upload your image.

Upload the image to your server’s images folder and note the address of your server’s image location.

For example …

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

This information will be required in Step 3.

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 a contact page.

Create a contact page and note down its URL …

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

Step 3 – Create 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 contact page.

Your code can be typed in a plain text editor and should look something like this …

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

  • 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 which sections of the above code you will need to replace with the actual contact page and image URLs …

Add A Clickable Support Button To The Sidebar Navigation Area 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 understanding basic HTML code, refer to this tutorial:

Next, go back to your Widgets area …

Activate or deactivate widgets using drag-and-drop

(Widgets Screen)

Step 4 – Add a Text widget.

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

In the Available Widgets area, find the Text widget …

WordPress text widget

(WordPress text widget)

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

Drag-and-drop your Text widget

(Dragging and dropping your Text widget)

Step 5 – Configure the text widget.

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

Text widget

Add a heading to the widget if you want (e.g. “Need Help?”, “Get Support”, etc.) and paste the code with the correct destination links into the Content box, then click the save button …

WordPress text widget

Important

Note: Remember to test your contact page and image URLs before pasting scripts into your Text Widget, or the button will not work.

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

If you’re 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 paste in formatted HTML content 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 checked …

Automatically add paragraphs box not checked

(Automatically add paragraphs box not ticked)

Here is some text with Automatically add paragraphs box checked …

Automatically add paragraphs box ticked

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh your browser.

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

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

(Clickable support button widget on blog sidebar)

The screenshot above shows ’click for help’ button in the sidebar of a newly-installed WordPress site.

Step 7 – Test your widget.

The last step is to ensure that the destination link works. Test your button to make sure that visitors will go to the contact page when clicking the button. If you are taken directly to your support page, then the text widget has been set up correctly …

Test your clickable button

(Test the clickable button)

Tip

Useful Tips:

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

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

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

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

When adding images to your sidebar 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 can display different column widths depending on their templates and layout. Some sidebars are wide and some are narrow. If your theme’s sidebar width is narrower than the width of your button images, then you may have to either adjust the size of your images, or the column width to make the images display correctly on your theme.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

Additional Tips:

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

How To Use Widgets In WordPress

***

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

To view the rest of this tutorial, click this link:

***

"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum