In Part One of this step-by-step tutorial series, we cover the basics of how to use WordPress widgets.
In this section you will configure various frequently-used WordPress sidebar widgets.
Sidebar Widget Configuration
In a default WordPress installation, your site comes with a number of built-in widgets that can be used out of the box with minimal to no configuration required, such as widgets that let you display links to your pages, recent posts, news items, add tag clouds, etc.
(In a default WordPress installation, your site comes with several built-in widgets)
How To Configure Frequently-Used WordPress Sidebar Widgets: Step-By-Step Tutorial
In this tutorial, you will add, configure and reorder various WordPress widgets, including:
- Adding a Support Contact button linking visitors to the contact page.
- Adding a Categories section.
- Add a Recent Posts section to display the latest posts.
- Add a list of the site’s most important Pages.
- Display useful Links on the sidebar.
- Add an RSS Feed section.
- Adding a Tag Cloud.
- Configure how your Archived Posts display on the sidebar.
The Widgets area is located inside your WP admin area and can be easily accessed from the WordPress admin menu by going to Appearance > Widgets …
(WordPress Widgets Menu)
This brings up the Widgets area in your browser window …
Let’s begin by learning how to configure a text widget …
Adding Text Widgets To Your Blog Sidebar
Text widgets are quite useful …
A text widget can be used to add email and contact information, maps and directions, special promotions and more to your site … simply type in text or paste HTML into the content area. You can also add an optional title in the Title field. Remember to save your settings …
(A text widget is versatile!)
Example: Add A Help Button To The Sidebar Navigation Area Using A Text Widget
For this example, let’s set up a help button on your sidebar navigation menu 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 button to display at the top of the sidebar navigation menu like in the example shown below …
Step 1 – Upload your image.
Upload the image to a folder on your server and note the URL pointing to your image location.
This information will be used in Step 3.
For visitors to be taken to the contact page when the support button gets clicked, either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link the button graphic to this URL in Step 3 …
Step 2 – Create the destination 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. In simple terms, we just need to create the instructions for your clickable image.
Your instructions can be typed in a plain text file and will look something like this …
- Replace “https://www.yourdomain.com/contact-us” in the code above with the URL of your contact page location.
- Replace “https://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 the 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 understanding basic HTML code, see this tutorial: A Practical Guide To HTML For WordPress Site Owners
Now, go back to your Widgets area …
Step 4 – Add a Text widget.
Add a Text widget to your sidebar where you would like the clickable button to display.
In the Available Widgets area, find the Text widget …
Drag the Text widget to the Active Widgets section and release it at the very top of the Widget Area …
(Drag-and-drop your Text widget)
Step 5 – Configure the widget settings.
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 the text widget content area and click the save button …
Add a title to your 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 test your contact page and image links before pasting scripts into your Text Widget, or your clickable button will not work.
Also, if 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 an HTML paragraph code (note: this is not necessary if you type in HTML content like we’re doing in this tutorial).
Here is some text with Automatically add paragraphs box not ticked …
(Automatically add paragraphs box not ticked)
Here is some text with Automatically add paragraphs option ticked …
(Automatically add paragraphs box selected)
Step 6 – Refresh the web browser.
Once you have added the text widget and HTML content, visit your site and refresh your browser. If you have entered all of the links correctly, then the support button will display in the site’s sidebar menu …
(Clickable button widget on sidebar)
The screenshot above shows the support button in the sidebar of a newly-installed WordPress site.
Step 7 – Test the widget.
The last step is to ensure that your clickable button works. Test your button to make sure that visitors will go to your help page when they click on the graphic image. You should be taken directly to your support page …
(Test your clickable button)
If you would like a new browser window to open up when visitors click on your support button (so they don’t leave the page they’re in), then change the code from this:
To this (i.e. insert the section containing target=”_blank” in your code):
When adding images to your sidebar navigation section, 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 mentioned earlier, 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 the graphic image, then you may have to either adjust the size of your images, or the width of your sidebar column to make graphics display correctly on your sidebar area.
(Adjust column width or reduce image size)
- If you don’t want to center your image inside your sidebar, delete the <center> and </center> tags from the beginning and end of the line of code. The image will then align to the left.
- You can link the contact button to any URL you want (e.g. to an external site, helpdesk, support forum, etc.) and change this anytime by replacing the content inside the text widget.
This is the end of section two of this tutorial series about using WordPress widgets.
To view the rest of this tutorial, click here: How To Add And Configure WordPress Widgets In Your Sidebar Menu – Part 3
In addition to all of the content already published about WordPress on this site, If you’d like information on all the ways that WordPress can help you grow your business online, then I recommend that you subscribe below, so you can be instantly notified when I publish new articles and tutorials. Also, please feel free to contact me if you need any assistance with WordPress or marketing your business online.