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 And Configure Widgets In WordPressIn Part 1 of this tutorial, we explained the basics of using widgets in WordPress.

In this section you are going to learn how to configure several WordPress widgets.

Widget Configuration

By default, your site comes with several preinstalled active widgets, such as widgets that let you display links to your pages, filter posts by categories, newsfeeds, filter content by publish dates, etc.

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

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

Adding And Configuring Frequently-Used Sidebar Widgets: Tutorial

In this tutorial series, you will learn how to add, configure and reorder various frequently-used widgets, including:

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

To access the Widgets section log into your admin and go to Appearance > Widgets

Understanding WordPress For Newbies: About WordPress Widgets

(Widgets Menu)

This brings you to the Widgets area into your web browser …

Widgets Screen

(Widgets Screen)

Let’s get started …

Adding Text Widgets To Your Sidebar Menu

Text widgets are quite 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 your sidebar section or other widget sections, such as lists, social media buttons, special promotions and more to your site … simply by typing in text or pasting HTML into the content area. You can also give the widget a title. Remember to save your settings when done …

Text widgets are extremely versatile

(Text widgets are very useful!)

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

For this example, we’ll set up a 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, you will need to create or source a graphic image that your visitors can click on …

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

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

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

Step 1 – Upload your image.

To display an image on your site, first you must upload the button image to a folder on your server and write 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.

For someone to be taken to your contact page when the graphic 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 your button image to this URL in Step 3

Step 2 – Add your destination page.

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

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

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 typed in a plain text file and should look something like this …

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

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

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

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

If you need help understanding basic HTML code, see 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 where you want the clickable 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 very top of the Widget Area

Drag and drop your WordPress text widget

(Drag-and-drop your Text widget)

Step 5 – Configure your text widget settings.

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

Text widget

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

WordPress text widget

Info

Note: Remember to check all URLs before pasting scripts into your Text Widget, or your clickable button will not 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: this is not necessary if you’re pasting in HTML content like we’re using in the example for this tutorial).

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

Automatically add paragraphs option not checked

(Automatically add paragraphs option not selected)

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

Automatically add paragraphs option selected

(Automatically add paragraphs box selected)

***

Step 6 – Refresh the web browser.

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

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

(Clickable button widget on sidebar)

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

Step 7 – Test your widget.

The final step is to make sure that the links work. Test your button to make sure that your visitors will go to your help page when they click on the graphic image. If you are taken directly to the support page, then everything has been set up correctly …

Test your text widget

(Test your text widget)

Tip

Useful 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 in), then change the button code from this:

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

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

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

When inserting images into your sidebar navigation menu, make sure that the width of the image doesn’t 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 are wide and some are narrow. If your theme’s sidebar width is narrower than the width of the button image, then you may have to either adjust the size of your images, or the column width to make images display correctly on your sidebar section.

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

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

Additional Tips:

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

Adding WordPress Widgets To The Blog

***

This is the end of section 2 of this tutorial.

To continue 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