A lot of Service Business like Spa , Salon , Restaurants etc. display Opening / Working Hours on their website. In this Post I will share a simple snippet to add Working / Business Hours to the WordPress SideBar.
We will utilize the all powerful WordPress Text Widget to display the business Hours. Since the Text Widget Supports HTML , it is a matter of pasting an html snippet to display Business Hours.
Add the Text Widget to the Sidebar and name it “Opening Hours”.
Now Paste the following snippet in the Widget.
<div class = "my-business-hours"> <p>Monday - 9:00 AM to 9:00 PM </p> <p>Tuesday - 9:00 AM to 9:00 PM</p> <p>Wednesday - 9:00 AM to 9:00 PM</p> <p>Thursday - 9:00 AM to 9:00 PM</p> <p>Friday - 9:00 AM to 9:00 PM</p> <p style = "color:red">Saturday - Closed</p> <p Style = "color:red">Sunday - Closed</p> </div>
Thats it. Now visit your site, you will see the Business Hours appearing on your website.
Here is how the it looks with Twenty Twelve Theme Enabled
This is a simple snippet and once can easily customize the look by applying some CSS. For example you can change the color of Closed days, include different font for the Open Days.
The WordPress Text Widget is very Powerful and I would recommend reading this Guide to Customize the Text Widget
- How to create 301 Redirects in WordPress - December 21, 2019
- How to Filter Blog Posts by Author in WordPress Admin panel - October 21, 2019
- How to convert / change post type in wordpress - October 21, 2019