In this tutorial you are going to begin configuring a number of sidebar widgets in WordPress.
Configuring Sidebar 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, newsfeeds, filter content by publish dates, etc.
(In a default WordPress installation, your site comes with several built-in widgets)
How To Set Up Frequently-Used WordPress Widgets On The Blog Sidebar: Step-By-Step Tutorial
In this step-by-step tutorial series, you are going to learn how to add, configure and reorder various WordPress widgets, including:
- Adding a clickable Support graphic linking to your contact details page.
- Adding a Categories section.
- Adding a Recent Posts section to display your latest posts.
- Add a list of the site’s main Pages.
- Display important Links on your sidebar navigation area.
- Adding an RSS Feed section.
- Add a Tag Cloud.
- Configure how your Archived Posts display on the sidebar.
The Widgets area is located inside the WP administration by going to Appearance > Widgets …
(WordPress Widgets Menu)
This brings up the Widgets section in your browser …
Let’s get started …
Adding Text Widgets
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 lets you insert just about anything you want into the sidebar or other widget sections, such as email and contact information, maps and directions, scripts and more to your site … simply by typing in text or pasting HTML into the content area. You can also add an optional title in the Title field. Remember to save your settings …
(Text widgets are really useful!)
Example: Add A Clickable Help Button To Your Sidebar Navigation Menu Using A Text Widget
For this example, we’ll set up a help button on the sidebar that will take 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 visitors can click on …
We’ll set up the clickable button to display at the top of your sidebar like in the example shown below …
Step 1 – Upload your image.
To display an image on your site, the image must be uploaded to your server. Upload your button graphic to your server and note the URL pointing to your image location.
For example …
You will use this information in Step 3.
For visitors to be taken to your contact page when the help button gets clicked, 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 a destination page.
Create a contact page and note the page URL …
Step 3 – Compose the HTML code for your text widget.
If you’re not a technical-minded person, don’t worry … this sounds a lot more technical than it is. In simple terms, we just need to create the instructions linking the button image to your contact page/helpdesk.
Your instructions can be typed in a plain 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 above with the URL of your image location.
The screenshot below shows the sections of the above code that you will need to replace with your actual contact page and image URLs …
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, see this tutorial:
Next, go back into your Widgets screen …
Step 4 – Add a Text widget.
Add a Text widget to your sidebar where you want your support button to 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 the widget settings. Paste the code with the links to your contact page and graphic button into your text widget content area and click the save button …
Add a heading to your widget if you want (e.g. “Need Help?”, “Get Help”, etc.) and paste the code with the correct destination URLs into the Content box, then click Save when done …
Note: Make sure to check all URLs before pasting scripts into your Text Widget, or your button won’t work.
*** If using WordPress version pre-4.8 ***
If you’re adding text with no formatting tags like paragraph breaks, you may want to tick the Automatically add paragraphs box to wrap each block of text in paragraphs (note: not required if you type 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 checked …
(Automatically add paragraphs option not selected)
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.
After adding the widget and HTML content, go to your site and refresh the browser. If you have entered all of the links correctly, then your clickable support button will display at the top of your sidebar menu …
(Clickable support button widget on sidebar)
The screenshot above shows the support contact button in the sidebar navigation area of a brand new WordPress site.
Step 7 – Test the widget.
The last step is to ensure that the destination URL works. Test the button to make sure that visitors will go to your help page when they click on the button. If you are taken directly to the support page, then everything has been set up correctly …
(Test the text widget to make sure it works)
Text Widgets – Useful Tips:
If you would like the support page to open in 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. include the section containing target=”_blank” in the html code):
When choosing images for your sidebar area, make sure that the width of the image does not exceed the width of the sidebar column, especially if you are using a non-responsive WordPress theme. As mentioned earlier, some themes may display elements differently depending on their templates and layout. Some sidebars may be wider or narrower. If your theme’s sidebar is narrower than the width of your button images, then you may need to either adjust the image size, or the width of your sidebar column to make the images display correctly on your sidebar.
(Make sure the width of the image does not exceed the width of the sidebar column)
- If you don’t want to center the button 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).
- You can link your contact button to any URL you want (e.g. to an external link, helpdesk, support forum, etc.) and change this anytime by replacing the links inside the text widget.
This is the end of part two of this series of tutorials on using Widgets.
Click on this link to keep reading:
"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group