In Part One of this tutorial series, we cover the basics of using WordPress widgets.
In this section you will configure a number of frequently-used WordPress sidebar widgets.
By default, your site comes with several built-in widgets that can be used out of the box with little to no configuration required, such as widgets that let you display links to your pages, filter posts by categories, text or HTML banners, adding site search features, etc.
(In a default WordPress installation, your site comes with several built-in widgets)
How To Configure Sidebar Widgets: Tutorial
In this step-by-step tutorial, we are going to add, configure and reorder s number of widgets to display in the site’s sidebar navigation area, including:
- Add a clickable Support graphic linking visitors to your contact details page.
- Add a Categories section.
- Add a Recent Posts section.
- Add a list of your site’s Pages.
- Display important Links on your sidebar.
- Adding an RSS Feed section.
- Add a Tag Cloud section.
- Add and configure an Archives section to the sidebar.
The Widgets area can be easily accessed inside the admin by going to Appearance > Widgets …
(WordPress Widgets Menu)
This opens the Widgets area into your browser window …
Let’s get started …
Adding Text Widgets
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 lets you insert just about anything you want into your sidebar menu or other widget sections, such as email and contact information, maps and directions, reviews 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 when done …
(Text widgets are extremely versatile!)
Example: Add A Clickable Contact Button To The Sidebar Navigation Area Using A Text Widget
For this example, we’ll set up a clickable contact button on the sidebar area 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, you will need to create or source a graphic image that you will want your your visitors to click on …
We’ll set up the clickable Help button to display at the top of your sidebar like in the example shown below …
Step 1 – Upload your image.
Upload the graphic image to your server’s images folder and note down the path to your server’s image location.
You will use this information in Step 3.
For someone to go to your contact page when the help button gets clicked, you will need to either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link the button image to this URL in Step 3 …
Step 2 – Add the support page.
Create a contact page on your site and note its URL …
Step 3 – Compose the 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. Basically, you just need to create the instructions linking the button image to your destination URL.
Your instructions can be typed in 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 your actual contact details …
Replace the above URLs and then copy all of your text file content to your clipboard when finished.
If you need help with basic HTML code, refer to this tutorial:
Next, go back to your Widgets screen …
Step 4 – Add a Text widget.
Add a Text widget to your sidebar in the location where the button should display.
In the Available Widgets area, select the Text widget …
(WordPress text widget)
Drag the Text widget to the Active Widgets section and release the widget at the top of the Widget Area …
(Dragging and dropping your WordPress text widget)
Step 5 – Configure the text widget settings.
Click on the Text widget title bar to configure its 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 heading to your widget if you want (e.g. “Need Help?”, “Get Help”, etc.) and paste the code with the correct URLs into the large text box, then click Save when done …
Note: Make sure to test all links before pasting scripts into your Text Widget, or the clickable button won’t work.
*** If using WordPress version pre-4.8 ***
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 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 checked …
(Automatically add paragraphs option not ticked)
Here is some text with Automatically add paragraphs option ticked …
(Automatically add paragraphs box ticked)
Step 6 – Refresh your web browser.
After adding the widget and formatted content, visit the front end of your site and refresh the browser. If you have entered all of the links correctly, then the clickable support button should display in the site’s sidebar menu …
(Clickable support button widget on sidebar)
The screenshot above shows a clickable button in the sidebar of a brand new WordPress site.
Step 7 – Test the widget.
The last step is to make sure that your clickable button works. Test this by clicking on the button. If you are taken to your support page, then your text widget has been set up correctly …
(Test the clickable button)
If you want a new browser window to open up when visitors go to your support page (so they don’t leave the page they’re in), then change the code from this:
To this (i.e. insert the section that says: target=”_blank” in your text widget code):
When inserting images into 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. Note that some themes can display different column widths depending on their templates and their layout. Some sidebars are wide and some are narrow. If the sidebar of your theme is narrower than the width of the button images, then you may have to either adjust the image size, 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 your button 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 aligned to its default settings (normally left-aligned).
- Link your help button to any URL you want (e.g. to an external link, helpdesk, forum, etc.) and change this anytime by editing the code in the widget.
This is the end of section 2 of this tutorial series.
Click on this link to continue reading:
"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum