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 Your SidebarIn Part 1 of this step-by-step tutorial, we cover the basics of using WordPress widgets.

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

Sidebar Widget Configuration

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 for displaying links to your site’s pages, recent posts, text or HTML banners, filter content by tags, etc.

In a default WordPress installation, your site comes with several preinstalled widgets

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

Adding Sidebar Widgets In WordPress: Tutorial

In this step-by-step tutorial series, we are going to add, configure and reorder various WordPress widgets to display in the site’s sidebar, including:

  • Adding a Help graphic linking to the contact page.
  • Add a Categories section with a drop down menu.
  • Add a Recent Posts section.
  • Add a list of the site’s Pages.
  • Display Links on your sidebar menu.
  • Add an RSS Feed section.
  • Add a Tag Cloud.
  • Adding and configuring an Archives section to your sidebar.

To access the Widgets area log into your WordPress administration and go to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets area in your web browser …

Widgets Area

(Widgets Area)

Let’s get started …

Adding Text Widgets To Your Sidebar Navigation Menu

Text widgets are incredibly useful …

Text widget

(WordPress Text widget)

Important

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 the sidebar navigation area or other widget sections, such as events, social media buttons, reviews and more to your site … just by typing in text or pasting HTML into the content area. You can also add an optional title in the Title field. Remember to save your settings …

A text widget is extremely versatile

(Text widgets are very useful!)

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

For this example, we’ll set up a clickable support button on your sidebar 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 “help button” graphic image that visitors can click on …

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

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

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

Step 1 – Upload your image.

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

E.g. …

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

This information will be required in Step 3.

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

Create a contact page and note its URL …

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

Step 3 – Compose the code for your text widget.

Don’t worry … this sounds a lot more technical than it is. In simple terms, you just need to create the instructions linking your button image to the contact page/helpdesk.

Your instructions can be written a plain text editor and should look something like this …

Add A Clickable Contact Button To The Sidebar Navigation Menu 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 above with the URL of your image location.

The screenshot below shows which sections of the above code you need to replace with your actual contact page and image URLs …

Use A Text Widget To Add A Clickable Support Button To Your 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, see this tutorial:

Next, go back to your Widgets section …

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 the Text widget …

WordPress text widget

(Text widget)

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

Dragging and dropping your Text widget

(Drag and drop your WordPress text widget)

Step 5 – Configure your widget.

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

WordPress text widget

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

WordPress text widget

Useful Information

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

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

If you’re adding text without 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 code like we’re doing in this tutorial).

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

Automatically add paragraphs box unchecked

(Automatically add paragraphs option not checked)

Here is some text with Automatically add paragraphs option selected …

Automatically add paragraphs option ticked

(Automatically add paragraphs box ticked)

***

Step 6 – Refresh the browser.

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

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

(Clickable button widget on sidebar)

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

Step 7 – Test the button.

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

Test the text widget to make sure it works

(Test your text widget to ensure you’ve set up everything correctly)

Practical Tip

Text Widgets – Useful Tips:

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

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

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

Add A Contact Button To The Sidebar Area Using A Text Widget - open in new window

When choosing images for your sidebar area, 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. As we’ve previously mentioned, some themes may display elements differently depending on their templates and 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 size of your images, or the width of your sidebar column to make the images display correctly on your sidebar.

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

(Adjust column width or reduce image size)

Extra Tips:

  • If you don’t want the 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 left-aligned.
  • Link your support button to any URL you like (e.g. to an external site, helpdesk, support forum, etc.) and change this anytime by editing the code inside the text widget.

Adding And Configuring WordPress Widgets In The Sidebar Area

***

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

Click on this link to continue:

***

"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