How To Use And Configure WordPress Widgets – Part 2

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

Adding And Configuring WordPress Widgets In Your SidebarIn Part One of this tutorial series, we explained the basics of using widgets in WordPress.

In this section you are going to learn how to configure various commonly-used widgets in WordPress.

How To Configure Sidebar Widgets

By default, your site comes with several built-in active widgets, such as widgets that let you display external links, recent posts, text or HTML banners, add a search box, 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 preinstalled widgets)

Adding Sidebar Widgets In WordPress: Step-By-Step Tutorial

In this step-by-step tutorial, you will add, configure and reorder s number of widgets, including:

  • Add a Contact Us image linking visitors to the contact details page.
  • Add a Categories section with a drop down menu.
  • Add a Recent Posts section to display your latest posts.
  • Add a list of your site’s most important Pages.
  • Display useful Links on your sidebar navigation area.
  • Display newsfeeds using an RSS Feed section.
  • Add a Tag Cloud section.
  • Configure how Archived Posts display on the sidebar.

The Widgets panel is located in the WordPress dashboard and can be easily accessed by going to Appearance > Widgets …

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets section in your browser window …

Widgets Panel

(Widgets Area)

Let’s configure text widgets …

Add A Text Widget

Text widgets are versatile …

WordPress 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)

A text widget can be used to add quotes, social media buttons, scripts and more to your site … just by typing in text or pasting HTML into the widget content area. You can also add an optional title in the Title field. Remember to save your settings when done …

A text widget is very useful

(A text widget is extremely versatile!)

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

For this example, we’ll set up a clickable contact button on your sidebar navigation area 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 …

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

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

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

Step 1 – Upload your image.

To display the image on your site, the image must be uploaded to your server. Upload the image to the images folder in your server and note down the URL pointing to your image location.

For example …

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

You will use this information in Step 3.

In order for visitors to be taken to your contact page when they click on the help button, you must 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 your contact page.

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

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

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. Basically, you just need to create the instructions for your clickable image.

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

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

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

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

Using A Text Widget To Add A Help Button To The Sidebar 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:

Now, go back to your Widgets section …

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 button should display.

In the Available Widgets area, find the Text widget …

WordPress text widget

(WordPress text widget)

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

Dragging and dropping your WordPress text widget

(Drag-and-drop your WordPress text widget)

Step 5 – Configure the text widget settings.

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

Text widget

Add a title to the widget if you want (e.g. “Need Help?”, “Support”, etc.) and paste the code with the correct URLs into the Content area, then click Save when done …

WordPress text widget

Important

Note: Make sure to test all URLs before pasting scripts into the Text Widget, or the clickable button will not 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 paragraphs (note: not required if you type in formatted HTML content like we’re using in the example for this tutorial).

Here is some text with Automatically add paragraphs box unchecked …

Automatically add paragraphs box not selected

(Automatically add paragraphs option unchecked)

Here is some text with Automatically add paragraphs option checked …

Automatically add paragraphs box selected

(Automatically add paragraphs option checked)

***

Step 6 – Refresh your web browser.

After adding the widget and formatted content, visit your site and refresh the browser. If all links have been entered correctly, then the clickable support button should display at the top of the sidebar menu …

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

(Clickable support button widget on blog sidebar)

The screenshot above shows the contact button added to a brand new WordPress site.

Step 7 – Test your button.

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

Test the text widget

(Test your clickable button to ensure you’ve set up everything correctly)

Useful Tip

Useful Tips:

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

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

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

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

When inserting images into 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. As we’ve previously mentioned, some themes can display elements differently depending on their templates and their layout. Some sidebars may be too wide or too narrow. If the sidebar of your theme 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 graphics display correctly on your theme.

Adjust column width or reduce image size

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

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 line of code. The image will then be aligned to its default settings (normally left-aligned).
  • You can link the contact button to any destination you like (e.g. to an external site, contact form, support forum, etc.) and change this anytime by editing the content in your text widget.

How To Add WordPress Widgets To Your Sidebar Navigation Section

***

This is the end of section 2 of this series of tutorials about how to use Widgets.

Click here to continue:

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com