In Part One of this step-by-step tutorial, we cover the basics of using widgets in WordPress.
In this section you will learn how to begin configuring a number of sidebar widgets in WordPress.
Configuring Sidebar Widgets
In a default WordPress installation, your site comes with several pre-installed widgets that can be used out of the box with minimal to no configuration needed, such as widgets that let you display external links, recent posts, RSS feed content, add a search box, etc.
(By default, your site comes with a number of preinstalled widgets)
Configuring Commonly-Used WordPress Sidebar Widgets In WordPress: Step-By-Step Tutorial
In this step-by-step tutorial series, you will add, configure and reorder various widgets to display in your site’s sidebar, including:
- Add a Support graphic linking to the support page.
- Adding a Categories section with a drop down menu.
- Add a Recent Posts section to display the latest posts.
- Add a list of Pages.
- Display Links on the sidebar.
- Display a newsfeed with an RSS Feed section.
- Add tag links with a Tag Cloud section.
- Adding and configuring an Archives section to the sidebar navigation area.
The Widgets panel is located inside the WP administration area and can be easily accessed from the WordPress dashboard menu by clicking on Appearance > Widgets …
(Widgets Menu)
This brings you to the Widgets screen into your web browser …
(Widgets Section)
Let’s begin by learning how to configure text widgets …
Adding Text Widgets
Text widgets are versatile …
(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 email and contact information, ads, tips and more to your site … just type in text or paste HTML into the widget content area. You can also add an optional title in the Title field. Remember to save your settings when done …
(A text widget is very useful!)
Example: Add A Clickable Contact Button To The Sidebar Area Using A Text Widget
For this example, we’ll set up a help button on your sidebar that takes 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 can use on your own site …
We’ll set up the clickable button to display at the top of the sidebar like in the example shown below …
Step 1 – Upload your image.
Upload the graphic image to a folder on your server and write down the address of your image location.
E.g. …
http://www.yourdomain.com/images/supportbutton.jpg
This information will be required in Step 3.
In order for visitors to be taken to the contact page when they click on the support button, 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 your contact page.
Create a contact page and note the page URL …
Step 3 – Create your text widget code.
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 image.
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 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 the sections of the above code that you need to replace with your actual contact details …
Replace the above URLs and then copy all of the above code to your clipboard when finished.
If you need help with basic HTML code, see this tutorial:
Next, go back to your Widgets section …
(Widgets Area)
Step 4 – Add a Text widget.
Add a Text widget to your sidebar in the location where your button should display.
In the Available Widgets area, find the Text widget …
(WordPress text widget)
Drag your Text widget to your Active Widgets section and release it at the very top of the Widget Area …
(Dragging and dropping your WordPress text widget)
Step 5 – Configure your widget.
Click on the Text widget title bar to configure its options. 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 title section to the 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 Save when done …
Note: Remember to test all links 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’re typing in HTML content like we’re doing in this tutorial).
Here is some text with Automatically add paragraphs option not ticked …
(Automatically add paragraphs box not ticked)
Here is some text with Automatically add paragraphs box ticked …
(Automatically add paragraphs option checked)
***
Step 6 – Refresh the web browser.
Once you have added your text widget and code content, visit the front-end of your site and refresh the web browser. If you have entered all of the links correctly, then the clickable support button will display at the top of your site’s sidebar menu …
(Clickable support button widget on blog sidebar)
The above screenshot shows a clickable button in the sidebar navigation area of a newly-installed WordPress site.
Step 7 – Test your button.
The last step is to make sure that your links work. Test the button to make sure that visitors will go to the help page when clicking the button. If you are taken to the contact page, then your text widget has been set up correctly …
(Test your text widget)
Useful Tips:
If you want a new window to open up when visitors click on your help button (so they don’t leave the page they’re in), then change the text widget code from this:
To this (i.e. include the section containing target=”_blank” in the html code):
When choosing images to add to your sidebar navigation section, 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 we’ve previously mentioned, some themes can display elements differently depending on their templates and layout. Some sidebars are wide and some are narrow. If your theme’s sidebar width is narrower than the width of your graphic images, then you may have to either adjust the graphic size, or the width of your sidebar column to make elements display correctly on your theme.
(Adjust column width or reduce image size)
Additional Tips:
- If you don’t want your button image to be centered inside the sidebar, delete the <center> and </center> tags from the beginning and end of the HTML code. The image will then align to the left.
- You can link your help button to any destination you like (e.g. to an external link, helpdesk, FAQ page, etc.) and change this anytime by replacing the links inside the widget.
***
This is the end of section two of this series of tutorials.
Click on this link to continue:
***
"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com