In Part 1 of this step-by-step tutorial series, we explained the basics of how to use widgets in WordPress.
In this section you will begin configuring various widgets in WordPress.
Configuring Widgets
By default, your site comes with a number of built-in widgets, such as widgets for displaying links to your site’s pages, recent posts, news items, adding search features, etc.
(In a default WordPress installation, your site comes with a number of preinstalled widgets)
How To Configure Commonly-Used Sidebar Widgets In WordPress: Tutorial
In this tutorial, we will add, configure and reorder various widgets, including:
- Adding a clickable Support button linking to the help page.
- Adding a Categories section with a drop down menu.
- Add a Recent Posts section to display your latest posts.
- Add a list of Pages.
- Display useful Links on the sidebar.
- Adding an RSS Feed section.
- Adding tags to your sidebar using a Tag Cloud section.
- Configure how Archived Posts display on the sidebar navigation area.
The Widgets panel is located inside your WordPress dashboard and can easily be accessed from the dashboard menu by clicking on Appearance > Widgets …
(Widgets Menu)
This brings you to the Widgets section in your browser …
(Widgets Section)
Let’s start by configuring text widgets …
Adding Text Widgets To The Sidebar Area
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 events, image links, reviews and more to your site … simply type in text or insert HTML into the widget content area. You can also give the widget a title. Remember to save your settings …
(A text widget is really useful!)
Example: Add A Clickable Support Button To The Sidebar Navigation Section Using A Text Widget
For this example, let’s set up a help button on your sidebar 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 graphic image that visitors can click on …
We’ll set up a clickable Help button to display at the top of your sidebar like in the example shown below …
Step 1 – Upload your image.
To display the clickable button image on your site, you must first upload the graphic image to a folder on your server and note down the path to your server’s image location.
E.g. …
http://www.yourdomain.com/images/supportbutton.jpg
You will use this information in Step 3.
In order for visitors to be taken to your contact page when the graphic button is clicked, you will need to 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 your support page.
Create a contact page on your site and note down 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. In simple terms, we just need to create the instructions for your clickable button.
Your instructions can be typed into a simple text editor and will 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 with the URL of your image location.
The image 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, see this tutorial:
Next, go back to your Widgets screen …
(Widgets Screen)
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 the Text widget …
(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 Text widget)
Step 5 – Configure your widget settings.
Click on the widget title bar to configure its 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 heading to your widget if you want (e.g. “Need Help?”, “Get Support”, etc.) and paste the code with the correct destination URLs into the large text box, then click the save button …
Note: Make sure to test your contact page and 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, 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 pasting in HTML content like we’re doing in this tutorial).
Here is some text added to a Text widget with Automatically add paragraphs box not ticked …
(Automatically add paragraphs box not checked)
Here is some text with Automatically add paragraphs box checked …
(Automatically add paragraphs option selected)
***
Step 6 – Refresh the web browser.
After adding the text widget and formatted content, visit the front-end of your site and refresh the web browser. If all links have been entered correctly, then the support button will display at the top of the sidebar menu …
(Clickable button widget on sidebar)
The screenshot above shows the button in the sidebar of a brand new WordPress site.
Step 7 – Test your button.
The last step is to ensure that your destination URL works. Test this by clicking the support button. If you are taken directly to your contact page, then everything has been set up correctly …
(Test your clickable button)
Tips:
If you would like your support page to open in a new browser window when visitors click on the help (so they don’t leave the page they’re on), then change the button code from this:
To this (i.e. insert the part that says: target=”_blank” in the code):
When choosing images to add to your sidebar navigation menu, 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. As we’ve previously mentioned, some themes can display different column widths 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 images, then you may have to either adjust the size of your images, or the column width to make images display correctly on your sidebar section.
(Make sure that 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 align to the left.
- Link the contact button to any destination you like (e.g. to an external link, helpdesk, forum, etc.) and change this anytime by replacing the code in the widget.
***
This is the end of part 2 of this tutorial series.
Click here to continue reading:
***
"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya