This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this function to your theme's functions.php or a custom plugin file | |
// To use the shortcode you should call [check_open_status location_id="123"] | |
//Replace '123' with your location ID (edit a location and you will find this in the url) | |
function check_if_location_open( $atts ) { | |
// Extract shortcode attributes | |
$atts = shortcode_atts( | |
array( | |
'location_id' => '', // Default is empty, you need to provide location_id |