In Part 1 of this tutorial series, we explained the basics of how to use WordPress widgets.
In this section you are going to begin configuring a number of frequently-used WordPress sidebar widgets.
Sidebar Widget Configuration
By default, your site comes with a number of built-in active widgets, such as widgets that let you display external links, filter posts by categories, RSS feed content, adding tag clouds, etc.
(By default, your site comes with several pre-installed widgets)
How To Set Up Commonly-Used Widgets On Your Blog Sidebar Navigation Area: Tutorial
In this step-by-step tutorial series, you are going to add, configure and reorder various frequently-used WordPress widgets, including:
- Adding a clickable Support Contact image linking to the help page.
- Adding a Categories section.
- Add a Recent Posts section to display your latest posts.
- Add a list of Pages.
- Display useful Links on your sidebar navigation area.
- Display a newsfeed using an RSS Feed section.
- Adding tags to the sidebar with a Tag Cloud.
- Adding and configuring an Archives section to the sidebar.
To use widgets, access the Widgets panel located inside the administration by going to Appearance > Widgets …
This loads the Widgets section in your web browser …
Let’s begin by learning how to configure text widgets …
Add A Text Widget To The Blog Sidebar
Text widgets are versatile …
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 policies, image links, news and updates 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!)
Example: Using A Text Widget To Add A Support Button To Your Sidebar Navigation Area
For this example, we’ll set up a clickable contact button on your sidebar navigation 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, create or source a “help button” graphic image that visitors can click on …
We’ll set up the clickable button to display at the top of the sidebar like in the example shown below …
Step 1 – Upload your image.
To display the image on your site, first you must upload the graphic image to your server and write down the URL pointing to your image location.
For example …
You will need this information in Step 3.
In order for someone to go to your contact page when the help 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 then link the button image to this URL in Step 3 …
Step 2 – Add a contact page.
Create a contact page and note down its URL …
Step 3 – Compose your text widget code.
Don’t worry … this sounds a lot more technical than it is. Basically, you just need to create the instructions linking the graphic image to the contact page/helpdesk.
Your instructions can be typed into a plain text file and will look something like this …
- Replace “http://www.yourdomain.com/contact-us” in the code 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 which sections of the above code you will need to replace with the actual web addresses …
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:
Next, go back to your Widgets area …
Step 4 – Add a Text widget.
Add a Text widget to your sidebar where you would like the button to display.
In the Available Widgets area, find a Text widget …
Drag the Text widget to the Active Widgets section and release it at the top of the Widget Area …
(Drag-and-drop your Text widget)
Step 5 – Configure your widget settings.
Click on the widget title bar to configure its options. 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 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 box, then click the save button …
Note: Remember to test all links before pasting scripts into your Text Widget, or your clickable button won’t 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: not required if you type in formatted HTML content like we’re using in the example for this tutorial).
Here is some text with Automatically add paragraphs option not selected …
(Automatically add paragraphs option not checked)
Here is some text added to a Text widget with Automatically add paragraphs box selected …
(Automatically add paragraphs box ticked)
Step 6 – Refresh the browser.
Once you have added your text widget and code, go to the front end of your site and refresh your browser. If all links have been entered correctly, then the clickable support button will display at the top of your site’s sidebar menu …
(Clickable support button widget on sidebar)
The above screenshot shows the support contact button added to a brand new WordPress site.
Step 7 – Test the widget.
The final step is to make sure that the destination link works. Test this by clicking on the graphic button. If you are taken to the contact page, then the text widget has been set up correctly …
(Test the clickable button to make sure you’ve set everything up correctly)
If you would like your support page to display inside a new window when visitors click on the help (so they don’t leave the page they’re on), then change the button code from this:
To this (i.e. add the section containing target=”_blank” in the html code):
When adding images to your sidebar menu, 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. As mentioned earlier, some themes may display different column widths depending on their templates and their layout. Some sidebars may be too wide or too narrow. If your theme’s sidebar width is narrower than the width of your button images, then you may need to either adjust the size of your images, or the column width to make elements display correctly on your theme.
(Make sure that the width of the image does not exceed the width of the sidebar column)
- If you don’t want the button image to be centered inside your sidebar, delete the <center> and </center> tags from the beginning and end of the code. The image will then be left-aligned.
- Link the support button to any URL you want (e.g. to an external site, helpdesk, FAQ page, etc.) and change this anytime by replacing the content inside your text widget.
This is the end of part 2 of this tutorial series.
To continue, click this link:
"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie