In Part One of this tutorial, we explained the basics of how to use WordPress widgets.
In this section you will learn how to begin configuring various WordPress sidebar widgets.
Configuring Sidebar Widgets
In a default WordPress installation, your site comes with a number of built-in widgets, such as widgets for displaying links to your site’s pages, filter posts by categories, newsfeeds, add a search box, etc.
(In a default WordPress installation, your site comes with several pre-installed widgets)
Configuring Commonly-Used Sidebar Widgets: Step-By-Step Tutorial
In this tutorial series, you will learn how to add, configure and reorder s number of widgets, including:
- Add a clickable Support Contact graphic linking to your support page.
- Add a Categories section with a drop down menu.
- Add a Recent Posts section to display your latest posts.
- Adding a list of Pages.
- Display important Links on the sidebar menu.
- Adding an RSS Feed section.
- Adding a list of clickable tags with a Tag Cloud section.
- Adding and configuring an Archives section to the sidebar.
The Widgets screen is located inside your WP dashboard and can easily be accessed by going to Appearance > Widgets …
(Widgets Menu)
This loads the Widgets panel in your web browser …
(Widgets Screen)
Let’s start to configure some widgets …
Adding Text Widgets
Text widgets are incredibly 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 can be used to add events, social media buttons, tips and more to your site … simply type in text or insert HTML into the widget content area. You can also add an optional title in the Title field. Remember to save your settings when done …
(A text widget is very useful!)
Example: Add A Clickable Contact Button To Your Sidebar 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 your visitors can click on …
We’ll set up a clickable button to display at the top of the sidebar like in the example shown below …
Step 1 – Upload your image.
Upload the 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
You will use this information in Step 3.
In order for someone to be taken 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 your button image to this URL in Step 3 …
Step 2 – Add the destination page.
Create a contact page and note down its URL …
Step 3 – Create your text widget code.
Don’t worry … this sounds a lot more technical than it is. Basically, we just need to create the instructions for your clickable image.
Your code can be typed in a simple text editor and will 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 screenshot below shows which sections of the above sample code you will need to replace with the actual web addresses …
Replace the above URLs and then copy all of your text file content to your clipboard when finished.
If you need help understanding basic HTML code, refer to this tutorial:
Next, 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 your support button should display.
In the Available Widgets area, find a Text widget …
(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 your text widget settings.
Click on the widget title bar to configure its settings. Paste the code with the links to your contact page and graphic button into the text widget content area and click the save button …
Add a heading to the widget if you want (e.g. “Need Help?”, “Support”, etc.) and paste the code with the correct URLs into the text area, then click the save button …
Note: Remember to check all links before pasting scripts into your Text Widget, or your button will not work.
*** If using WordPress version pre-4.8 ***
If you’re adding text without formatting tags like paragraph breaks, 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 typing in HTML content like we’re doing in this tutorial).
Here is some text added to a Text widget with Automatically add paragraphs box not selected …
(Automatically add paragraphs box not ticked)
Here is some text with Automatically add paragraphs box ticked …
(Automatically add paragraphs option ticked)
***
Step 6 – Refresh your browser.
Once you have added your widget and HTML content, go to your site and refresh the web browser. If all links have been entered correctly, then the clickable support button will display in your sidebar menu …
(Clickable button widget on sidebar)
The above screenshot shows the support contact button added to a newly-installed WordPress site.
Step 7 – Test the widget.
The last step is to make sure that your destination link works. Test this by clicking on the button. If you are taken to the support page, then the text widget has been set up correctly …
(Test the text widget to ensure you’ve set up everything correctly)
Tips:
If you want your support page to display inside a new browser window when visitors click on the support (so they don’t leave the page they’re on), then change the code from this:
To this (i.e. insert the section that says: target=”_blank” in the html code):
When choosing images for your sidebar navigation menu, make sure that the width of your image doesn’t exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. As we’ve previously mentioned, some themes may display different column widths depending on their templates and layout. Some sidebars may be wider or narrower. If your theme’s sidebar width is narrower than the width of your graphic images, then you may need to either adjust the image size, or the width of your sidebar column to make images display correctly on your theme.
(Make sure the image width does not exceed the width of the sidebar column)
Extra Tips:
- If you don’t want your button image to be centered inside the sidebar, delete the <center> and </center> tags from the beginning and end of the code. The image will then be left-aligned.
- Link the help button to any URL you like (e.g. to an external link, helpdesk, forum, etc.) and change this anytime by editing the code inside the text widget.
***
This is the end of part two of this series of tutorials on using WordPress widgets.
To view Part Three, 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