How To Use And Configure WordPress Widgets – Part 2

Learn how to add, configure, and use text widgets on your WordPress sidebar …

How To Use WordPress WidgetsIn Part 1 of this tutorial, we cover the basics of using WordPress widgets.

In this tutorial you are going to configure a number of commonly-used widgets in WordPress.

How To Configure Widgets

By default, your site comes with a number of pre-installed widgets, such as widgets that let you display external links, recent posts, news items, add content search features, etc.

In a default WordPress installation, your site comes with a number of built-in widgets

(In a default WordPress installation, your site comes with several built-in widgets)

Configuring Widgets On The Blog Sidebar Area: Step-By-Step Tutorial

In this tutorial, you will learn how to add, configure and reorder various WordPress widgets, including:

  • Adding a Support image linking visitors to your contact details page.
  • Adding a Categories section with a drop down menu.
  • Adding a Recent Posts section.
  • Adding a list of your site’s most important Pages.
  • Display Links on your sidebar.
  • Displaying a newsfeed with an RSS Feed section.
  • Adding a Tag Cloud.
  • Configure how Archived Posts display on your sidebar.

The Widgets panel is located inside the dashboard area by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets section into your browser window …

Widgets Area

(Widgets Screen)

Let’s configure a text widget …

Add A Text Widget To The Sidebar Menu

Text widgets are quite useful …

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 comments, images, special promotions and more to your site … just type in text or insert HTML into the content area. You can also give the widget a title. Remember to save your settings …

Text widgets are extremely versatile

(A text widget is really versatile!)

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

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

Add A Clickable Help 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 navigation menu like in the example shown below …

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

Step 1 – Upload your image.

To display the clickable image on your site, you must first upload the image to your server and note the URL pointing to your image location.

E.g. …

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

You will need this information in Step 3.

In order for someone to go to your contact page when they click on the support button, you will need to 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 the contact page.

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

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

Step 3 – Compose the HTML code for your text widget.

If you’re not a technical-minded person, don’t worry … this sounds a lot more technical than it is. In simple terms, you just need to create the instructions linking your graphic image to your destination URL.

Your instructions can be typed into a plain text file and should look something like this …

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

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

The image below shows the sections of the above sample code that you need to replace with your actual contact details …

Using A Text Widget To Add A Clickable Help 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 with basic HTML code, refer to this tutorial:

Go back to your Widgets area …

Activate or deactivate widgets using drag-and-drop

(Widgets Area)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar where you want your clickable button to display.

In the Available Widgets area, find the Text widget …

WordPress text widget

(Text widget)

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

Drag-and-drop your WordPress text widget

(Drag and drop your WordPress text widget)

Step 5 – Configure your 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 save …

WordPress 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 large text box, then click Save when done …

WordPress text widget

Info

Note: Make sure to test your contact page and button image links before pasting scripts into the Text Widget, or the clickable 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: not required if you type in formatted HTML code like we’re doing in this tutorial).

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

Automatically add paragraphs option not selected

(Automatically add paragraphs box not checked)

Here is some text with Automatically add paragraphs option ticked …

Automatically add paragraphs box selected

(Automatically add paragraphs box checked)

***

Step 6 – Refresh the web browser.

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

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

(Clickable support button widget on sidebar)

The above screenshot shows the support button in the sidebar menu of a brand new WordPress site.

Step 7 – Test your button.

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

Test the clickable button to ensure it works

(Test the text widget)

Tip

Useful Tips:

If you want your support page to display in a new 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 Support Button To Your Sidebar Section Using A Text Widget

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

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

When adding images to 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. Note that some themes can display elements differently depending on their templates and layout. Some sidebars may be wider or narrower. If your theme’s sidebar is narrower than the width of your button image, then you may need to either adjust the image size, or the width of your sidebar column to make graphics display correctly on your sidebar.

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

(Adjust column width or reduce image size)

More Tips:

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

How To Use Widgets In WordPress

***

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

Click here to keep reading:

***

"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now