In Part One of this step-by-step tutorial series, we cover the basics of how to use WordPress widgets.
In this tutorial you are going to learn how to begin configuring several WordPress widgets.
How To Configure Sidebar Widgets
By default, your site comes with several pre-installed active widgets, such as widgets that let you display links to your pages, recent posts, RSS feed content, adding content search features, etc.
(In a default WordPress installation, your site comes with a number of built-in widgets)
Configuring Commonly-Used WordPress Sidebar Widgets: Step-By-Step Tutorial
In this step-by-step tutorial series, you are going to learn how to add, configure and reorder s number of widgets, including:
- Add a clickable Contact Us button linking visitors to the contact details page.
- Add a Categories section.
- Add a Recent Posts section.
- Add a list of Pages.
- Display important Links on your sidebar.
- Adding an RSS Feed section.
- Add a Tag Cloud.
- Configure how your Archived Posts display on your sidebar section.
The Widgets area is located in your WordPress dashboard and can be accessed by going to Appearance > Widgets …
(Widgets Menu)
This brings you to the Widgets panel into your browser …
(Widgets Section)
Let’s start by learning how to configure a text widget …
Add A Text Widget
Text widgets are quite useful …
(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 can be used to add notices, social media buttons, messages and more to your site … just by typing in text or inserting HTML into the widget content area. You can also give the widget a title. Remember to save your settings when done …
(A text widget is really useful!)
Example: Use A Text Widget To Add A Contact Button To The Sidebar Area
For this example, let’s set up a clickable help button on the sidebar navigation 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 your visitors can click on …
We’ll set up the clickable Help button to display at the top of your sidebar area like in the example shown below …
Step 1 – Upload your image.
To display the image on your site, first you must upload the button image to your server and note the URL pointing to your image location.
E.g. …
http://www.yourdomain.com/images/supportbutton.jpg
You will need this information in Step 3.
For someone to be taken to the contact page when they click on the graphic button, you must 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 a contact page.
Create a contact page and note the page 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 linking the button image to your contact page.
Your code can be written a simple 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 which sections of the above code you need to replace with the actual web addresses …
Replace the above URLs and then copy the above code to your clipboard when finished.
If you need help with basic HTML code, refer to this tutorial:
Next, go back to your Widgets panel …
(Widgets Panel)
Step 4 – Add a Text widget.
Add a Text widget to your sidebar in the location where the clickable button should display.
In the Available Widgets area, select the Text widget …
(Text widget)
Drag your Text widget to your Active Widgets section and release the widget at the very top of the Widget Area …
(Drag-and-drop your Text widget)
Step 5 – Configure the text widget settings.
Click on the Text widget title bar to configure the widget 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 section to your widget if you want (e.g. “Need Help?”, “Support”, etc.) and paste the code with the correct destination links into the Content box, then click Save when done …
Note: Remember to test all URLs before pasting scripts into the Text Widget, or your clickable button won’t work.
*** If using WordPress version pre-4.8 ***
If you’re adding text with no formatting tags, you may want to tick the Automatically add paragraphs box to wrap each block of text in an HTML paragraph code (note: not required if you type in formatted HTML code like we’re using in the example for this tutorial).
Here is some text added to a Text widget with Automatically add paragraphs box not checked …
(Automatically add paragraphs option unchecked)
Here is some text added to a Text widget with Automatically add paragraphs option selected …
(Automatically add paragraphs box ticked)
***
Step 6 – Refresh your web browser.
After adding your text widget and code, visit your site and refresh your web browser. If all links have been entered correctly, then your clickable support button should display in your sidebar menu …
(Clickable button widget on blog sidebar)
The above screenshot shows the support contact button in the sidebar of a brand new WordPress site.
Step 7 – Test the button.
The final step is to make sure that the links work. Test the button to make sure that visitors will go to the help page when clicking the graphic image. If you are taken directly to your contact page, then the text widget has been set up correctly …
(Test your clickable button)
Tips:
If you want your support page to display in a new browser window when visitors click on the support (so they don’t leave the page they’re on), then change the code from this:
To this (i.e. include the part containing target=”_blank” in your text widget code):
When choosing images for your sidebar navigation menu, make sure that the width of your image doesn’t exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. As mentioned earlier, some themes can display elements differently depending on their templates and layout. Some sidebars may be too wide or too narrow. If the sidebar of your theme is narrower than the width of your graphic image, then you may need to either adjust the graphic size, or the width of your sidebar column to make graphics display correctly on your sidebar section.
(Make sure that the width of the image does not exceed the width of the sidebar column)
More Tips:
- If you don’t want your button to be centered 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 the support button to any destination you want (e.g. to an external link, helpdesk, forum, etc.) and change this anytime by replacing the content inside the text widget.
***
This is the end of part two of this series of tutorials on using Widgets.
Click here to continue reading:
***
"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