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 WordPress Widgets In Your SiteIn Part 1 of this tutorial series, we cover the basics of using WordPress widgets.

In this section you are going to configure 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 little to no configuration required, such as widgets for displaying external links, recent posts, RSS feed content, add search features, etc.

In a default WordPress installation, your site comes with a number of pre-installed widgets

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

Adding Widgets To The Blog Sidebar Section: Tutorial

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

  • Adding a clickable Help button linking to the support page.
  • Adding a Categories section.
  • Add a Recent Posts section.
  • Adding a list of Pages.
  • Display useful Links on the sidebar.
  • Add an RSS Feed section.
  • Adding a Tag Cloud section.
  • Configure how your Archived Posts display on your sidebar.

The Widgets screen is located in the WP administration area and can be accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets section in your browser …

Widgets Section

(Widgets Screen)

Let’s begin to configure some sidebar widgets …

Text Widgets

Text widgets are incredibly versatile …

Text widget

(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 let you insert just about anything you want into your sidebar navigation area or other widget sections, such as article snippets, ads, news and updates and more to your site … just by typing in text or inserting HTML into the widget content area. You can also give the widget a title. Remember to save your settings when done …

Text widgets are really versatile

(A text widget is really versatile!)

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

For this example, let’s set up a clickable help button on the sidebar 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 you will use on your own site …

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

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

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

Step 1 – Upload your image.

Upload the image to the images folder in your server and note the path to your server’s image location.

E.g. …

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

This information will be used in Step 3.

For someone to be taken 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 link the button image to this URL in Step 3

Step 2 – Add a destination page.

Create a contact page and note down its URL …

Use A Text Widget To Add A Contact Button To Your Sidebar Section

Step 3 – Create your text widget code.

Don’t worry … this sounds a lot more technical than it is. Basically, we just need to create the instructions linking the graphic image to your contact page/helpdesk.

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

Add A Contact Button To Your Sidebar Navigation Area 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 with the URL of your image location.

The screenshot below shows which sections of the above sample code you will need to replace with the actual web addresses …

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

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

If you need help with basic HTML code, see this tutorial:

Now, go back into your Widgets screen …

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

In the Available Widgets area, find a Text widget …

Text widget

(Text widget)

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

Drag-and-drop your WordPress text widget

(Dragging and dropping your Text widget)

Step 5 – Configure your widget.

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

Text widget

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

Text widget

Useful Info

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

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

Automatically add paragraphs option not checked

(Automatically add paragraphs box not ticked)

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

Automatically add paragraphs option selected

(Automatically add paragraphs option checked)

***

Step 6 – Refresh the browser.

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

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

(Clickable support button widget on sidebar)

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

Step 7 – Test the button.

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

Test your clickable button

(Test your text widget to ensure it works)

Practical Tip

Text Widgets – Useful Tips:

If you would like the contact page to open inside a new browser window when visitors click on the help (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 Help Button To The Sidebar Navigation Menu

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

Add A Clickable Contact Button To Your Sidebar Navigation Area Using A Text Widget - open in new window

When adding images to your sidebar menu, 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 their layout. Some sidebars may be wider or narrower. If the sidebar of your theme is narrower than the width of the graphic image, then you may have to either adjust the image size, or the width of your sidebar column to make elements display correctly on your sidebar section.

Adjust column width or reduce image size

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

More Tips:

  • If you don’t want your image to be centered in the 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 support button to any destination you like (e.g. to an external link, contact form, FAQ page, etc.) and change this anytime by replacing the content in your text widget.

Adding And Configuring WordPress Widgets In The Site

***

This is the end of section two of this series of tutorials.

Click here to continue:

***

"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