In Part One of this tutorial series, we cover the basics of using WordPress widgets.
In this tutorial you will learn how to configure a number of WordPress widgets.
Widget Configuration
In a default WordPress installation, your site comes with a number of built-in active widgets, such as widgets that let you display links to your pages, recent posts, newsfeeds, adding search features, etc.
(By default, your site comes with a number of built-in widgets)
Adding And Configuring Commonly-Used Widgets On The WordPress Sidebar Menu: Tutorial
In this step-by-step tutorial, you will add, configure and reorder a number of commonly-used widgets to display in your site’s sidebar, including:
- Adding a clickable Support Contact button linking visitors to your contact page.
- Adding a Categories section.
- Adding a Recent Posts section.
- Add a list of Pages.
- Display important Links on the sidebar.
- Display news items with an RSS Feed section.
- Adding clickable tags using a Tag Cloud.
- Adding and configuring an Archives section to your sidebar section.
The Widgets area is located inside the WordPress dashboard and can be accessed from the WP administration menu by choosing Appearance > Widgets …
(WordPress Widgets Menu)
This opens the Widgets screen into your browser …
(Widgets Screen)
Let’s begin by learning how to configure a text widget …
Adding Text Widgets
Text widgets are incredibly 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)
Text widgets let you insert just about anything you want into the sidebar or other widget sections, such as policies, ads, scripts and more to your site … just type in text or add 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 extremely versatile!)
Example: Add A Clickable Contact Button To The Sidebar Section Using A Text Widget
For this example, let’s set up a help button on your 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, create or source a “help button” graphic image that visitors can click on …
We’ll set up the clickable Help button to display at the top of the sidebar menu like in the example shown below …
Step 1 – Upload your image.
To display the clickable image on your site, the graphic image must be uploaded to your server. Upload your 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
This information will be used in Step 3.
For someone 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 then link the button graphic to this URL in Step 3 …
Step 2 – Create a support page.
Create a contact page and note down its URL …
Step 3 – Compose the HTML 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. In simple terms, you just need to create the instructions for your clickable button.
Your code can be typed into a plain text file and should 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 sample 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:
Now, go back into your Widgets area …
(Widgets Screen)
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 the Text widget …
(WordPress text widget)
Drag your Text widget to the Active Widgets section and release the widget at the very top of the Widget Area …
(Drag-and-drop your WordPress text widget)
Step 5 – Configure the widget settings.
Click on the widget title bar to configure its 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 heading to the widget if you want (e.g. “Need Help?”, “Support”, etc.) and paste the code with the correct URLs into the text area, then click the save button …
Note: Make sure to test all URLs before pasting scripts into the Text Widget, or your button will not work.
*** If using WordPress version pre-4.8 ***
If adding text without 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 paste in formatted content like we’re doing in this tutorial).
Here is some text added to a Text widget with Automatically add paragraphs option not ticked …
(Automatically add paragraphs box unchecked)
Here is some text with Automatically add paragraphs box selected …
(Automatically add paragraphs option selected)
***
Step 6 – Refresh your browser.
Once you have added the widget and content, visit the front-end of your site and refresh your browser. If you have entered all of the links correctly, then your clickable support button should display in the site’s sidebar menu …
(Clickable support button widget on sidebar)
The screenshot above shows ’click for help’ button in the sidebar of a newly-installed WordPress site.
Step 7 – Test the button.
The final step is to make sure that the clickable button works. Test the button to make sure that your visitors will go to your help page when clicking the button. You should be taken to your support page …
(Test the clickable button)
Tips:
If you would like your contact page to display inside a new browser window when visitors click on the support (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 html code):
When adding images to your sidebar navigation section, make sure that the width of the 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 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 the graphic image, then you may have to either adjust the size of your images, or the width of your sidebar column to make the images display correctly on your sidebar.
(Adjust column width or reduce image size)
Additional Tips:
- 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 be left-aligned.
- You can 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 links in your text widget.
***
This is the end of section two of this tutorial series.
Click on this link to access the rest of this tutorial:
***
"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group