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 WordPress SidebarIn Part One of this tutorial series, we explained the basics of using widgets in WordPress.

In this tutorial you will learn how to configure a number of WordPress widgets.

Configuring Sidebar Widgets

In a default WordPress installation, your site comes with several preinstalled active widgets, such as widgets that let you display links to your site’s pages, recent posts, news items, adding tag clouds, etc.

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

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

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

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

  • Adding a clickable Contact Us image linking visitors to the contact details page.
  • Adding a Categories section.
  • Add a Recent Posts section to display your latest posts.
  • Adding a list of Pages.
  • Display useful Links on the sidebar.
  • Displaying newsfeeds with an RSS Feed section.
  • Add a Tag Cloud section.
  • Adding and configuring an Archives section to your sidebar.

To access the Widgets panel go to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(WordPress Widgets Menu)

This brings up the Widgets section in your browser window …

Widgets Section

(Widgets Screen)

Let’s get started …

Add A Text Widget

Text widgets are 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)

Text widgets let you insert just about anything you want into your sidebar or other widget sections, such as events, videos, special promotions and more to your site … just by typing in text or pasting 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

(A text widget is very useful!)

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

For this example, we’ll set up a clickable support button on the 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 you will want visitors to click on …

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

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

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

Step 1 – Upload your image.

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

For example …

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

This information will be used in Step 3.

In order for someone to be taken to your contact page when the support button is clicked, you must either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link the button graphic to this URL in Step 3

Step 2 – Add a contact page.

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

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

Step 3 – Compose your text widget code.

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 composed in a simple text editor and should look something like this …

Use A Text Widget To Add A Clickable Help Button To The 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 your actual contact page and image URLs …

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

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

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

Next, go back to your Widgets panel …

Activate or deactivate widgets using drag-and-drop

(Widgets Screen)

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

WordPress text widget

(WordPress text widget)

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

Drag-and-drop your WordPress text widget

(Dragging and dropping 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 save …

Text widget

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

Text widget

Important Info

Note: Make sure to test all links before pasting scripts into the Text Widget, or your 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 an HTML paragraph code (note: this is not necessary if you type in formatted HTML content like we’re doing in this tutorial).

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

Automatically add paragraphs option unchecked

(Automatically add paragraphs box not checked)

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

Automatically add paragraphs box ticked

(Automatically add paragraphs box selected)

***

Step 6 – Refresh the web browser.

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

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

(Clickable button widget on blog sidebar)

The screenshot above shows the support contact button added to a newly-installed WordPress site.

Step 7 – Test the widget.

The final step is to make sure that the clickable button works. Test this by clicking the graphic button. You should be taken directly to your support page …

Test the clickable button

(Test the clickable button)

Practical Tip

Tips:

If you want your contact page to open inside 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:

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

To this (i.e. insert the section containing target=”_blank” in the text widget code):

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

When choosing images to add to your sidebar navigation 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 can 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 images, then you may need to either adjust the size of your images, or the width of your sidebar column to make the images 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 help button to any destination you like (e.g. to an external link, helpdesk, forum, etc.) and change this anytime by editing the content inside your text widget.

How To Use WordPress Widgets

***

This is the end of section two of this tutorial series about how to use WordPress widgets.

To view Part 3, click here:

***

"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