Google has an API for everything! I put together a few lines of code to grab the hours of operation from a given business on Google My Business. Next, I created a very basic shortcode to use in WordPress.

Things you will need to use this on your website:

You’re more than welcome to just contact us directly to implement this cool feature!

  • Google Places API Key
  • Google Places ID
  • WordPress Child Theme

Just drop the code below in your child theme’s functions.php and use the shortcode on line 3 anywhere in your content. Here’s an example of our hours!

We Are Open Now

Our Hours Are:

  • Monday: 9:00 AM – 5:00 PM
  • Tuesday: 9:00 AM – 5:00 PM
  • Wednesday: 9:00 AM – 5:00 PM
  • Thursday: 9:00 AM – 5:00 PM
  • Friday: 9:00 AM – 5:00 PM
  • Saturday: 10:00 AM – 3:00 PM
  • Sunday: Closed

Super simple to implement and customize – you can even create unique messages for when you’re open OR closed 🙂

Contact us to learn about adopting the web for your business

    Author Jarod Thornton

    More posts by Jarod Thornton