How To Use And Configure WordPress Widgets – Part 2

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

Adding Widgets To The SidebarIn Part 1 of this step-by-step tutorial series, we explained the basics of how to use widgets in WordPress.

In this section you will learn how to configure various widgets in WordPress.

Configuring Widgets

In a default WordPress installation, your site comes with a number of preinstalled widgets that can be used out of the box with little to no configuration needed, such as widgets that let you display links to your pages, recent posts, text or HTML banners, filter content by tags, etc.

By default, your site comes with several preinstalled widgets

(In a default WordPress installation, your site comes with a number of active widgets)

How To Set Up Commonly-Used WordPress Widgets On Your Blog Sidebar Menu: Step-By-Step Tutorial

In this step-by-step tutorial, we are going to add, configure and reorder s number of WordPress widgets, including:

  • Add a Support Contact button linking to the contact details page.
  • Add a Categories section with a drop down menu.
  • Add a Recent Posts section.
  • Adding a list of the site’s most important Pages.
  • Display a list of useful Links on your sidebar menu.
  • Display news items using an RSS Feed section.
  • Add a list of clickable tags with a Tag Cloud.
  • Add and configure an Archives section to your sidebar.

To use widgets, access the Widgets panel located inside the WP dashboard by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings you to the Widgets area in your web browser …

Widgets Panel

(Widgets Screen)

Let’s get started …

Text Widgets

Text widgets are incredibly versatile …

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)

A text widget can be used to add instructions, social media buttons, tips and more to your site … just by typing in text or inserting 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

(Text widgets are really useful!)

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

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

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

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

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

Step 1 – Upload your image.

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

For example …

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

You will need this information in Step 3.

In order for someone to be taken to your contact page when they click on the help button, either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will then link the button image to this URL in Step 3

Step 2 – Add the destination page.

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

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

Step 3 – Compose the 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, we just need to create the instructions linking the graphic image to your destination URL.

Your code can be typed in a simple text file and should look something like this …

Using A Text Widget To Add A Clickable Support 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 screenshot below shows the sections of the above sample code that you need to replace with the actual contact details …

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

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

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

Next, go back into your Widgets area …

Activate or deactivate widgets using drag & drop

(Widgets Screen)

Step 4 – Add a Text widget.

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

In the Available Widgets area, select a Text widget …

WordPress text widget

(Text widget)

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

Dragging and dropping your Text widget

(Dragging and dropping your WordPress text widget)

Step 5 – Configure the widget settings.

Click on the Text widget title bar to configure its settings. Paste the code with the links to your contact page and graphic button into your 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?”, “Get Help”, etc.) and paste the code with the correct URLs into the large text box, then click Save when done …

WordPress text widget

Important

Note: Make sure to test all URLs before pasting scripts into your Text Widget, or your button will not work.

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

If you’re adding text with no formatting tags like paragraph breaks, you may want to tick the Automatically add paragraphs box to wrap each block of text in paragraphs (note: not required if you type in formatted content 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 unchecked

(Automatically add paragraphs box not selected)

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

Automatically add paragraphs box checked

(Automatically add paragraphs option ticked)

***

Step 6 – Refresh your web browser.

Once you have added your text widget and HTML code, go to the front-end of your site and refresh the web browser. If all links have been entered correctly, then the clickable support button should display in the sidebar menu …

Add A Help Button To Your Sidebar Navigation Menu Using A Text Widget

(Clickable button widget on sidebar)

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

Step 7 – Test your widget.

The final step is to ensure that your clickable button works. Test the button to make sure that visitors will go to the contact page when they click on the button. You should be taken to the support page …

Test your text widget

(Test your text widget to make sure it works)

Practical Tip

Useful Tips:

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

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

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

Using A Text Widget To Add A Help Button To Your Sidebar Area - open in new window

When choosing images for your sidebar menu, make sure that the width of your image doesn’t exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. Note that some themes may display different column widths depending on their templates and their layout. Some sidebars may be too wide or too narrow. If your theme’s sidebar width is narrower than the width of the button images, then you may have to either adjust the image size, or the column width to make elements display correctly on your sidebar section.

Adjust column width or reduce image size

(Adjust column width or reduce image size)

Additional Tips:

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

Adding And Configuring WordPress Widgets In The Sidebar

***

This is the end of section two of this tutorial.

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