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 WordPressIn Part One of this step-by-step tutorial, we explained the basics of using WordPress widgets.

In this tutorial you will learn how to begin configuring various WordPress widgets.

Widget Configuration

By default, your site comes with several preinstalled widgets that can be used out of the box with minimal to no configuration required, such as widgets for displaying external links, filter posts by categories, newsfeeds, add search features, etc.

By default, your site comes with a number of pre-installed widgets

(By default, your site comes with several pre-installed widgets)

Adding Widgets To Your Sidebar: Tutorial

In this step-by-step tutorial series, we will add, configure and reorder a number of frequently-used WordPress widgets, including:

  • Add a Support image linking to your contact page.
  • Add a Categories section.
  • Add a Recent Posts section to display your latest posts.
  • Add a list of your site’s most important Pages.
  • Display Links on the sidebar navigation section.
  • Add an RSS Feed section.
  • Adding tag links through a Tag Cloud section.
  • Add and configure an Archives section to your sidebar.

The Widgets section is located in the WP dashboard and can easily be accessed from the WP admin menu by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This loads the Widgets panel in your browser …

Widgets Area

(Widgets Area)

Let’s get started …

Add A Text Widget

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)

A text widget can be used to add comments, images, tips and more to your site … simply type in text or insert HTML into the widget content area. You can also give the widget a title. Remember to save your settings when done …

Text widgets are very useful

(Text widgets are versatile!)

Example: Use A Text Widget To Add A Contact Button To Your Sidebar Navigation Section

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

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

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

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

Step 1 – Upload your image.

To display an image on your site, the graphic image must be uploaded to your server. Upload your image to your server and note down the path 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 the contact page when the graphic button gets clicked, you must either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will then link your button image to this URL in Step 3

Step 2 – Create a destination page.

Create a contact page and note the page URL …

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

Step 3 – Create your text widget code.

Don’t worry … this sounds a lot more technical than it is. Basically, you just need to create the instructions for your clickable button.

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

Using A Text Widget To Add A Clickable Help Button To The Sidebar Navigation 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 code that you need to replace with your actual contact details …

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

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

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

Now, go back to your Widgets panel …

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 the button to display.

In the Available Widgets area, select a Text widget …

Text widget

(WordPress text widget)

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

Drag and drop your WordPress text widget

(Drag-and-drop your Text widget)

Step 5 – Configure your widget.

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

WordPress text widget

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

Text widget

Important

Note: Make sure to check your contact page and image URLs before pasting scripts into your Text Widget, or your button won’t work.

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

If adding text without 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 paste in code like we’re using in the example for this tutorial).

Here is some text with Automatically add paragraphs box not ticked …

Automatically add paragraphs option unchecked

(Automatically add paragraphs option unchecked)

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

Automatically add paragraphs option selected

(Automatically add paragraphs box checked)

***

Step 6 – Refresh your browser.

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

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

(Clickable support button widget on blog sidebar)

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

Step 7 – Test your button.

The final step is to ensure that your destination link works. Test this by clicking on the button. You should be taken directly to the contact page …

Test your clickable button

(Test the text widget to make sure it works)

Tip

Text Widgets – Useful Tips:

If you want a new window to open up when visitors go to the support page (so they don’t leave the page they’re on), then change the button code from this:

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

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

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

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

Adjust column width or reduce image size

(Adjust column width or reduce image size)

More Tips:

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

Adding And Configuring WordPress Widgets In The Sidebar Navigation Menu

***

This is the end of part 2 of this tutorial.

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