In Part 1 of this tutorial, we explained the basics of how to use WordPress widgets.
In this tutorial you are going to learn how to configure various WordPress sidebar widgets.
Sidebar Widget Configuration
By default, your site comes with several built-in active widgets, such as widgets that let you display external links, recent posts, newsfeeds, add tag clouds, etc.
(By default, your site comes with a number of active widgets)
Configuring Frequently-Used WordPress Widgets On Your WordPress Sidebar Section: Tutorial
In this tutorial, we are going to add, configure and reorder various widgets to display in your site’s sidebar, including:
- Adding a clickable Support Contact graphic button linking visitors to your contact details page.
- Adding a Categories section with a drop down menu.
- Adding a Recent Posts section to display the latest posts.
- Adding a list of Pages.
- Display a list of useful Links on the sidebar navigation menu.
- Add an RSS Feed section.
- Add a Tag Cloud section.
- Adding and configuring an Archives section to the sidebar navigation area.
To use widgets, access the Widgets panel located inside the administration by going to Appearance > Widgets …
(Widgets Menu)
This loads the Widgets screen in your web browser …
(Widgets Panel)
Let’s get started …
Text Widgets
Text widgets are quite useful …
(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 lets you insert just about anything you want into your sidebar navigation section or other widget sections, such as lists, maps and directions, special promotions and more to your site … simply type in text or insert HTML into the widget content area. You can also give the widget a title. Remember to save your settings …
(Text widgets are very useful!)
Example: Add A Support Button To Your Sidebar Menu Using A Text Widget
For this example, let’s set up a support button on the sidebar menu 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, you will need to create or source a “help button” graphic image that you can use on your own site …
We’ll set up a clickable Help button to display at the top of your sidebar section like in the example shown below …
Step 1 – Upload your image.
To display the image on your site, the graphic image must be uploaded to your server. Upload the button image to a folder on your server and note the address of your image location.
For example …
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 graphic button, you must either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will then link the button image to this URL in Step 3 …
Step 2 – Create your support page.
Create a contact page on your site and note its URL …
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. Basically, we just need to create the instructions linking the button image to your destination URL.
Your instructions can be typed into a plain text editor 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 above with the URL of your image location.
The image below shows the sections of the above sample code that you will need to replace with the actual contact page and image URLs …
Replace the above URLs and then copy all of the above code to your clipboard when finished.
If you need help understanding basic HTML code, refer to this tutorial:
Go back to your Widgets area …
(Widgets Panel)
Step 4 – Add a Text widget.
Add a Text widget to your sidebar in the location where your button should display.
In the Available Widgets area, find the Text widget …
(WordPress text widget)
Drag your Text widget to your 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.
Click on the 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 …
Add a title 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: Make sure to check your contact page and button image URLs before pasting scripts into your Text Widget, or the clickable button will not 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 an HTML paragraph code (note: this is not necessary if you paste in HTML code like we’re using in the example for this tutorial).
Here is some text with Automatically add paragraphs box not checked …
(Automatically add paragraphs box unchecked)
Here is some text added to a Text widget with Automatically add paragraphs box selected …
(Automatically add paragraphs box selected)
***
Step 6 – Refresh the web browser.
Once you have added the widget and content, go to your site and refresh your browser. If all links have been entered correctly, then the support button should display at the top of your sidebar menu …
(Clickable support button widget on blog sidebar)
The screenshot above shows ’click for help’ button in the sidebar of a brand new WordPress site.
Step 7 – Test your button.
The final step is to ensure that the destination URL works. Test your button to make sure that visitors will go to the contact page when they click on the button. You should be taken to the contact page …
(Test your text widget to ensure you’ve set everything up correctly)
Useful Tips:
If you want a new window to open up when visitors click on the help button (so they don’t leave the page they’re on), then change the button code from this:
To this (i.e. add the part that says: target=”_blank” in the code):
When choosing images for your sidebar navigation section, make sure that the width of your image does not 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 layout. Some sidebars may be too wide or too narrow. If your theme’s sidebar width is narrower than the width of the button images, then you may need to either adjust the size of your images, or the width of your sidebar column to make elements display correctly on your sidebar section.
(Make sure the image width does not exceed the width of the sidebar column)
Additional Tips:
- If you don’t want to center the button image inside your sidebar, delete the <center> and </center> tags from the beginning and end of the HTML code. The image will then be left-aligned.
- You can link your help button to any destination you like (e.g. to an external link, contact form, forum, etc.) and change this anytime by replacing the content in the text widget.
***
This is the end of part 2 of this tutorial.
Click here to continue:
***
"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)