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 WebsiteIn Part 1 of this tutorial, we cover the basics of using widgets in WordPress.

In this tutorial you are going to begin configuring several widgets in WordPress.

How To Configure Widgets

By default, your site comes with a number of preinstalled active widgets, such as widgets that let you display external links, filter posts by categories, text or HTML banners, add search features, etc.

In a default WordPress installation, your site comes with several built-in widgets

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

How To Configure Frequently-Used WordPress Sidebar Widgets: Tutorial

In this tutorial, you are going to learn how to add, configure and reorder various widgets to display in your site’s sidebar navigation area, including:

  • Adding a clickable Support image linking visitors to the contact details page.
  • Adding 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 Pages.
  • Display a list of useful Links on your sidebar.
  • Display the latest news using an RSS Feed section.
  • Adding a list of clickable tags with a Tag Cloud.
  • Configure how Archived Posts display on the sidebar.

The Widgets panel is located inside your WP admin area and can be easily accessed by going to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings up the Widgets screen in your browser …

Widgets Section

(Widgets Section)

Let’s start to configure some sidebar widgets …

Add A Text Widget To Your Blog Sidebar

Text widgets are incredibly useful …

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)

Text widgets let you insert just about anything you want into the sidebar menu or other widget sections, such as lists, image links, scripts and more to your site … simply type in text or add HTML into the content area. You can also add an optional title in the Title field. Remember to save your settings when done …

A text widget is really useful

(Text widgets are really versatile!)

Example: Use A Text Widget To Add A Help Button To The Sidebar Area

For this example, let’s set up a contact button on the sidebar area that takes 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 Navigation Menu

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

Use A Text Widget To Add A Contact Button To The Sidebar Area

Step 1 – Upload your image.

Upload the graphic image to a folder on your server and note down the path to your server’s image location.

For example …

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

This information will be required in Step 3.

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

Step 2 – Create the destination page.

Create a contact page and note the page URL …

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

Step 3 – Create your text widget code.

If you’re not a technical-minded person, don’t worry … this sounds a lot more technical than it is. In simple terms, you just need to create the instructions for your clickable image.

Your code can be typed into a plain text editor and should look something like this …

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

  • 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 which sections of the above sample code you need to replace with your actual web addresses …

Using A Text Widget To Add A Contact Button To Your Sidebar Navigation Section

Replace the above URLs and then copy all of your text file content to your clipboard when finished.

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

Now, go back to your Widgets panel …

Activate or deactivate widgets using drag & drop

(Widgets Screen)

Step 4 – Add a Text widget.

Add a Text widget to your sidebar where you would like your button to display.

In the Available Widgets area, find the Text widget …

Text widget

(Text widget)

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

Dragging and dropping your Text widget

(Drag and drop your Text widget)

Step 5 – Configure the widget settings.

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

Text widget

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

WordPress text widget

Important

Note: Make sure to check all URLs before pasting scripts into the Text Widget, or the button won’t work.

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

If you’re 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 paste in formatted content like we’re doing in this tutorial).

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

Automatically add paragraphs option unchecked

(Automatically add paragraphs box not checked)

Here is some text with Automatically add paragraphs option checked …

Automatically add paragraphs option selected

(Automatically add paragraphs option checked)

***

Step 6 – Refresh the web browser.

After adding your widget and code content, visit your site and refresh your browser. If you have entered all of the links correctly, then your support button should display in your sidebar menu …

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

(Clickable button widget on sidebar)

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

Step 7 – Test your widget.

The final step is to ensure that your links work. Test the button to make sure that your visitors will go to the contact page when clicking the button. If you are taken directly to your contact page, then your text widget has been set up correctly …

Test your clickable button to make sure you've set up everything correctly

(Test your text widget to ensure it works)

Useful Tip

Tips:

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

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

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

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

When choosing images for your sidebar section, make sure that the width of your image does not exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. Note that 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 your graphic image, then you may have to either adjust the image size, or the width of your sidebar column to make graphics display correctly on your theme.

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

(Adjust column width or reduce image size)

More Tips:

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

How To Add And Configure Widgets In WordPress

***

This is the end of part 2 of this tutorial series on using Widgets.

To keep reading, click this link:

***

"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