In Part One of this tutorial, we explained the basics of using WordPress widgets.
In this tutorial you are going to learn how to begin configuring a number of WordPress sidebar widgets.
Configuring Widgets
By default, your site comes with a number of pre-installed active widgets, such as widgets that let you display links to your pages, filter posts by categories, text or HTML banners, adding a search box, etc.
(By default, your site comes with a number of preinstalled widgets)
Setting Up Commonly-Used Widgets On Your Sidebar: Step-By-Step Tutorial
In this step-by-step tutorial, you will learn how to add, configure and reorder various commonly-used widgets to display in your site’s sidebar navigation section, including:
- Adding a Support button linking to the support page.
- Add a Categories section.
- Adding a Recent Posts section to display the latest posts.
- Add a list of Pages.
- Display useful Links on the sidebar menu.
- Add an RSS Feed section.
- Adding a Tag Cloud.
- Add and configure an Archives section to your sidebar.
The Widgets panel is located inside your WordPress administration by going to Appearance > Widgets …
(Widgets Menu)
This brings up the Widgets screen in your browser …
(Widgets Screen)
Let’s configure a text widget …
Adding Text Widgets To Your Sidebar Navigation Menu
Text widgets are incredibly versatile …
(WordPress Text widget)
Rich Text Widget
From version 4.8 onward, WordPress has added native rich-text editing capabilities to text widgets …
(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, social media buttons, forms and more to your site … simply type in text or add HTML into the widget content area. You can also add an optional title in the Title field. Remember to save your settings …
(Text widgets are versatile!)
Example: Add A Clickable Contact Button To The Sidebar Navigation Menu Using A Text Widget
For this example, we’ll set up a contact button on your sidebar navigation section 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 …
We’ll set up a clickable Help button to display at the top of your sidebar navigation area like in the example shown below …
Step 1 – Upload your image.
To display the clickable button image on your site, the button image must be uploaded to your server. Upload your button image to the images folder in your server and note the path to your image location.
E.g. …
http://www.yourdomain.com/images/supportbutton.jpg
You will need this information in Step 3.
In order for someone to go to your contact page when they click on the help button, 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 – Add your contact page.
Create a contact page on your site and note its URL …
Step 3 – Compose the code for your text widget.
Don’t worry … this sounds a lot more technical than it is. In simple terms, we just need to create the instructions linking your button image to your destination URL.
Your instructions can be composed in a simple text file and should look something like this …
- 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 with the URL of your image location.
The image below shows the sections of the above sample code that you need to replace with your actual contact page and image URLs …
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:
Now, go back into your Widgets panel …
(Widgets Area)
Step 4 – Add a Text widget.
Add a Text widget to your sidebar in the location where the clickable button should display.
In the Available Widgets area, select a 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)
Step 5 – Configure the text widget settings.
Click on the Text 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 the save button …
Add a heading to the widget if you want (e.g. “Need Help?”, “Get Support”, etc.) and paste the code with the correct destination links into the Content area, then click the save button …
Note: Remember to check all URLs before pasting scripts into the Text Widget, or the clickable 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 paragraphs (note: not required if you’re pasting in formatted HTML content like we’re doing in this tutorial).
Here is some text with Automatically add paragraphs box unchecked …
(Automatically add paragraphs box not ticked)
Here is some text added to a Text widget with Automatically add paragraphs option checked …
(Automatically add paragraphs option ticked)
***
Step 6 – Refresh the web browser.
Once you have added the text widget and formatted content, go to the front-end of your site and refresh your web browser. If all links have been entered correctly, then your support button should display in your sidebar menu …
(Clickable support button widget on sidebar)
The screenshot above shows ’click for help’ button added to a brand new WordPress site.
Step 7 – Test your button.
The last step is to ensure that your destination link works. Test this by clicking the graphic button. If you are taken directly to your support page, then everything has been set up correctly …
(Test your text widget to make sure you’ve set everything up correctly)
Text Widgets – Useful Tips:
If you want your support page to open inside a new window when visitors click on the help (so they don’t leave the page they’re in), then change the button code from this:
To this (i.e. add the section that says: target=”_blank” in your text widget code):
When inserting images into your sidebar navigation area, 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 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 graphic size, or the width of your sidebar column to make elements display correctly on your sidebar.
(Adjust column width or reduce image size)
More Tips:
- If you don’t want the button image to be centered in 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 destination you want (e.g. to an external link, helpdesk, support forum, etc.) and change this anytime by editing the code inside the widget.
***
This is the end of section two of this tutorial about how to use Widgets.
To view the rest of this tutorial series, click this link:
***
"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