In this tutorial you will learn how to configure various frequently-used WordPress sidebar widgets.
By default, your site comes with a number of preinstalled active widgets, such as widgets for displaying links to your site’s pages, recent posts, RSS feed content, add search features, etc.
(In a default WordPress installation, your site comes with a number of pre-installed widgets)
Setting Up Commonly-Used WordPress Sidebar Widgets: Tutorial
In this step-by-step tutorial, we are going to add, configure and reorder various WordPress widgets to display in your site’s sidebar, including:
- Adding a Support Contact graphic button linking to your contact page.
- Add a Categories section with a drop down menu.
- Add a Recent Posts section to display the latest posts.
- Adding a list of Pages.
- Display Links on the sidebar menu.
- Adding an RSS Feed section.
- Adding a Tag Cloud section.
- Adding and configuring an Archives section to the sidebar menu.
The Widgets panel is located in the WordPress dashboard and can easily be accessed from the WordPress admin menu by clicking on Appearance > Widgets …
(WordPress Widgets Menu)
This brings up the Widgets screen in your browser window …
Let’s get started …
Add A Text Widget To The Sidebar Navigation Section
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 can be used to add lists, ads, scripts and more to your site … simply 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 …
(Text widgets are really useful!)
Example: Add A Contact Button To Your Sidebar Area Using A Text Widget
For this example, let’s set up a contact button on the sidebar 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 your visitors can click on …
We’ll set up a 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, you must first upload the image to your server and write down the address of your server’s image location.
This information will be used in Step 3.
In order for visitors to go to your contact page when the graphic button gets clicked, you must either create a contact page, or have an existing destination page already set up (e.g. a helpdesk). We will link your button graphic to this URL in Step 3 …
Step 2 – Add the contact page.
Create a contact page on your site and note its URL …
Step 3 – Create your text widget code.
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 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 which sections of the above sample code you will need to replace with your actual contact page and image URLs …
Replace the above URLs and then copy the above code to your clipboard when finished.
If you need help understanding basic HTML code, see this tutorial:
Next, go back to your Widgets section …
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, select a Text widget …
Drag the Text widget to your Active Widgets section and release it 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 links to your contact page and graphic button into your text widget content area and click save …
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 text area, then click the save button …
Note: Make sure to test all links before pasting scripts into the Text Widget, or your clickable button will not 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 paragraphs (note: this is not necessary if you’re typing in formatted content like we’re doing in this tutorial).
Here is some text with Automatically add paragraphs option not checked …
(Automatically add paragraphs box not checked)
Here is some text with Automatically add paragraphs option ticked …
(Automatically add paragraphs box checked)
Step 6 – Refresh the browser.
After adding the widget and code, visit your site and refresh your browser. If all links have been entered correctly, then the clickable support button should display in the site’s sidebar menu …
(Clickable support button widget on sidebar)
The screenshot above shows the contact button in the sidebar of a newly-installed WordPress site.
Step 7 – Test the button.
The final step is to make sure that your destination URL works. Test your button to make sure that visitors will go to the contact page when clicking the button. If you are taken directly to the contact page, then your text widget has been set up correctly …
(Test your text widget)
Text Widgets – Useful Tips:
If you want a new browser window to open up when visitors go to your contact page (so they don’t leave the page they’re in), then change the text widget code from this:
To this (i.e. add the part containing target=”_blank” in the html code):
When choosing images to add to your sidebar navigation menu, make sure that the width of the image does not exceed the width of your sidebar column, especially if you are using a non-responsive WordPress theme. As mentioned earlier, some themes can display different column widths depending on their templates and layout. Some sidebars may be wider or narrower. If the sidebar of your theme is narrower than the width of your button image, then you may need to either adjust the size of your images, or the column width to make images display correctly on your sidebar.
(Adjust column width or reduce image size)
- If you don’t want the button to be centered in your sidebar, delete the <center> and </center> tags from the beginning and end of the code. The image will then be left-aligned.
- You can link the support button to any URL you want (e.g. to an external link, helpdesk, support forum, etc.) and change this anytime by editing the content in the text widget.
This is the end of section 2 of this series of tutorials.
Click on this link to access the rest of this tutorial:
"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now