In Part One of this step-by-step tutorial, we cover the basics of how to use widgets in WordPress.
In this section you will learn how to begin configuring a number of frequently-used widgets in WordPress.
Configuring Frequently-Used WordPress Widgets
In a default WordPress installation, your site comes with a number of preinstalled widgets, such as widgets that let you display links to your pages, filter posts by categories, RSS feed content, add search features, etc.
(By default, your site comes with several built-in widgets)
Configuring Frequently-Used WordPress Widgets On The Blog Sidebar Navigation Area: Step-By-Step Tutorial
In this tutorial series, you are going to add, configure and reorder a number of frequently-used WordPress widgets, including:
- Adding a Contact Us image linking to your contact page.
- Add a Categories section.
- Adding a Recent Posts section to display your latest posts.
- Add a list of your site’s Pages.
- Display a list of useful Links on your sidebar.
- Adding an RSS Feed section.
- Adding a Tag Cloud.
- Adding and configuring an Archives section to the sidebar section.
The Widgets section is located inside your admin area by going to Appearance > Widgets …
(WordPress Widgets Menu)
This brings up the Widgets screen in your browser …
(Widgets Section)
Let’s begin configuring your widgets …
Adding Text Widgets To Your Blog Sidebar
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 lets you insert just about anything you want into your sidebar section or other widget sections, such as single lines or paragraphs of text, images, forms and more to your site … just type in text or add HTML into the widget content area. You can also give the widget a title. Remember to save your settings …
(Text widgets are very useful!)
Example: Add A Support Button To Your Sidebar Navigation Area Using A Text Widget
For this example, we’ll set up a clickable support button on your sidebar menu 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, create or source a graphic image that you will want visitors to click on …
We’ll set up the clickable Help button to display at the top of your sidebar section 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 the button image to the images folder in your server and note the address of your image location.
E.g. …
http://www.yourdomain.com/images/supportbutton.jpg
You will use this information in Step 3.
For visitors to be taken to the contact page when they click on the help button, either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will then link the button graphic to this URL in Step 3 …
Step 2 – Add a destination page.
Create a contact page and note the page 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, we just need to create the instructions for your clickable image.
Your instructions can be composed in 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 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 figuring out basic HTML code, refer to this tutorial:
Next, go back to your Widgets section …
(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 it at the very 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 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 title to your widget if you want (e.g. “Need Help?”, “Get Help”, etc.) and paste the code with the correct URLs into the Content area, then click the save button …
Note: Make sure to check your contact page and button image URLs before pasting scripts into your Text Widget, or the clickable 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 an HTML paragraph code (note: this is not necessary if you’re pasting in HTML code like we’re using in the example for this tutorial).
Here is some text with Automatically add paragraphs option unchecked …
(Automatically add paragraphs option not selected)
Here is some text added to a Text widget with Automatically add paragraphs option selected …
(Automatically add paragraphs box selected)
***
Step 6 – Refresh your browser.
After adding your text widget and formatted content, go to your site and refresh your web browser. If all links have been entered correctly, then your clickable support button should display at the top of the site’s sidebar menu …
(Clickable support button widget on blog sidebar)
The screenshot above shows the contact button added to a brand new WordPress site.
Step 7 – Test your button.
The last step is to ensure that your links work. Test this by clicking the button. You should be taken to your contact page …
(Test your text widget to ensure it works)
Useful Tips:
If you want a new window to open up when visitors go to the support page (so they don’t leave the page they’re on), then change the code from this:
To this (i.e. include the section that says: target=”_blank” in your text widget code):
When choosing images to add to your sidebar navigation area, make sure that the width of your image does not exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. Note that some themes can display elements differently depending on their templates and their layout. Some sidebars may be wider or narrower. If the sidebar of your theme is narrower than the width of the button images, then you may need to either adjust the size of your images, or the width of your sidebar column to make graphics display correctly on your sidebar section.
(Make sure the image width does not exceed the width of the sidebar column)
Extra Tips:
- If you don’t want your 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 your support button to any URL you want (e.g. to an external link, contact form, forum, etc.) and change this anytime by editing the links inside the text widget.
***
This is the end of part two of this tutorial series on using Widgets.
Click on this link to continue:
***
"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)