Show the Opening Hours in the Search Results

Normally the opening hours are only visible on the single stores pages and are not included in the search results. You can change this by using the wpsl_listing_template filter to overwrite the default template and include the opening hours data.

The code below shows the default search results template with extra code added on line 24 – 26 to show the opening hours data.

Copy the code, place it in the functions.php inside your active theme folder, and the opening hours will show up in the search results.

If you’re already using a custom search results template, then you only have to include line 24 – 26 in your existing template code to make the opening hours show up.

Do make sure to flush the transient cache after you added the above code to the functions.php . You can do this on the WPSL settings page -> Tools section.