We’re Open!

Standard shortcodes

Just the standard opening hours (placed in a shortcode block) without anything added.

[open]
Monday: 09:00 – 18:00
Tuesday: 09:00 – 18:00
Wednesday: 09:00 – 18:00
Thursday: 09:00 – 18:00
Friday: 09:00 – 18:00
Saturday: 09:00 – 14:30
Sunday: Closed

The following shortcodes can be placed in a normal text block; rather than a shortcode block. Once placed in the editor, check in the browser HTML to ensure that you’re compliant with web standards.

[open list]
  • Monday: 09:00 – 18:00
  • Tuesday: 09:00 – 18:00
  • Wednesday: 09:00 – 18:00
  • Thursday: 09:00 – 18:00
  • Friday: 09:00 – 18:00
  • Saturday: 09:00 – 14:30
  • Sunday: Closed
[open lines]

Monday: 09:00 – 18:00
Tuesday: 09:00 – 18:00
Wednesday: 09:00 – 18:00
Thursday: 09:00 – 18:00
Friday: 09:00 – 18:00
Saturday: 09:00 – 14:30
Sunday: Closed

[open sentence]
Monday: 09:00 – 18:00; Tuesday: 09:00 – 18:00; Wednesday: 09:00 – 18:00; Thursday: 09:00 – 18:00; Friday: 09:00 – 18:00; Saturday: 09:00 – 14:30; Sunday: Closed.

Table designs

There are many designs available built into the plugin’s functionality.

[open class="hours-right outside-flush no-border"]
Monday: 09:00 – 18:00
Tuesday: 09:00 – 18:00
Wednesday: 09:00 – 18:00
Thursday: 09:00 – 18:00
Friday: 09:00 – 18:00
Saturday: 09:00 – 14:30
Sunday: Closed
[open class="hours-right outside-flush no-border" consolidation="separate" time_format="12_dot_trim"]
Weekdays: 9am – 6pm
Saturday: 9am – 2.30pm
Sunday: Closed
[open class="hours-right current-line past-fade" day_format="short_date_short_month" time_format="12_dot_trim" update=true]
Mon 20th Sep: 9am – 6pm
Tue 21st Sep: 9am – 6pm
Wed 22nd Sep: 9am – 6pm
Thu 23rd Sep: 9am – 6pm
Fri 24th Sep: 9am – 6pm
Sat 25th Sep: 9am – 2.30pm
Sun 26th Sep: Closed
[open class="hours-right closed-italic past-fade" day_format="full_date_month" time_format="12_colon" update=true]
Monday 20th September: 9:00am – 6:00pm
Tuesday 21st September: 9:00am – 6:00pm
Wednesday 22nd September: 9:00am – 6:00pm
Thursday 23rd September: 9:00am – 6:00pm
Friday 24th September: 9:00am – 6:00pm
Saturday 25th September: 9:00am – 2:30pm
Sunday 26th September: Closed

With special opening hours, you can list alternative hours over the holiday period.

[open class="hours-right closed-italic" day_format="full_date_month" time_format="12_dot_trim" start="2020/12/23" end="2020/12/28"]
Tuesday 22nd December: 9am – 6pm
Wednesday 23rd December: 9am – 6pm
Thursday 24th December: 9am – 6pm
Friday 25th December: 9am – 6pm
Saturday 26th December: 9am – 2.30pm
Sunday 27th December: Closed
[open class="hours-right closed-bold" day_format="full_date_month_nos" regular=false start="2020/12/23" end="2021/01/03"]

Check out the HTML Classes section in the plugin’s settings located in the Shortcodes tab. Using the update parameter will refresh the design when the opening status and days change.

Opening hours as text

It is easy to add your opening hours as text in existing content or as a stand-alone section.

Our opening hours are: [open text time_format="12_dot_trim" closed="Oh no, we’re closed" day_separator="; | and "]

Our opening hours are: Monday: 9am – 6pm; Tuesday: 9am – 6pm; Wednesday: 9am – 6pm; Thursday: 9am – 6pm; Friday: 9am – 6pm; Saturday: 9am – 2.30pm and Sunday: Oh no, we’re closed.

Our opening hours are: [open text closed_show=false day_separator="; | and " consolidation="separate"]

Our opening hours are: Weekdays: 09:00 – 18:00 and Saturday: 09:00 – 14:30.

[open text tag="p" weekdays_text="" weekend_text="" everyday_text="" consolidation="weekdays"]

Monday – Friday: 09:00 – 18:00; Saturday: 09:00 – 14:30; Sunday: Closed.

All of these shortcodes can be placed in either the shortcode block or the standard text block. Be careful when only using the shortcode as you may need to add <div> or similar as an enclosing element. Once placed, please check in the browser HTML to ensure that you’re compliant with web standards.

Consolidation

You may group days in the week and weekend separately, together or not at all.

[open consolidation="none"]
Monday: 09:00 – 18:00
Tuesday: 09:00 – 18:00
Wednesday: 09:00 – 18:00
Thursday: 09:00 – 18:00
Friday: 09:00 – 18:00
Saturday: 09:00 – 14:30
Sunday: Closed
[open consolidation="separate"]
Weekdays: 09:00 – 18:00
Saturday: 09:00 – 14:30
Sunday: Closed
[open consolidation="weekdays"]
Weekdays: 09:00 – 18:00
Saturday: 09:00 – 14:30
Sunday: Closed
[open consolidation="weekdays" weekdays_text=""]
Monday – Friday: 09:00 – 18:00
Saturday: 09:00 – 14:30
Sunday: Closed
[open consolidation="weekend"]
Monday: 09:00 – 18:00
Tuesday: 09:00 – 18:00
Wednesday: 09:00 – 18:00
Thursday: 09:00 – 18:00
Friday: 09:00 – 18:00
Saturday: 09:00 – 14:30
Sunday: Closed
[open consolidation="all"]
Weekdays: 09:00 – 18:00
Saturday: 09:00 – 14:30
Sunday: Closed

Note the weekend will only appear consolidated both days, here Saturday and Sunday, have exactly the same opening hours. Additionally, full consolidation using “all” will only occur when all days have identical opening hours.

Conditional shortcodes

You can enclose any text or HTML content within a shortcode to show or hide this depending on the current status of the business: open or closed.

[open_now]We’re open![/open_now] [closed_now]Sorry, we’re closed[/closed_now]

We’re open!

By default the content of the shortcode will update itself when the change of status occurs. An enclosing tag of <div> or <span> is added depending on the content of the shortcode. It is always better to specify your preference.

[open_now tag="div" update=false]<img src="/wp-content/uploads/Were-Open-Motif.svg" alt="We’re Open!">[/open_now]
[closed_now tag="div" update=false]<img src="/wp-content/uploads/Were-Closed-Motif.svg" alt="We’re Closed">[/closed_now]
We’re Open!

If you are using a caching service on your website, the content of the page may be out-dated. So, you can perform an immediate check using the current time and returning the correct information.

[open_now update="immediate"]We’re currently open, but just checking because this website uses a caching service… The time is: [open_text]%now%[/open_text].[/open_now]
[closed_now update="immediate"]We’re currently closed, but just checking because this website uses a caching service… The time is: [open_text]%now%[/open_text].[/closed_now]
We’re currently open, but just checking because this website uses a caching service… The time is: 12:43.

You can reload the entire page on the change from open to closed (or vice-versa). Nothing will appear if the business is currently closed. Note in the working shortcode, the reload functionality is disabled so that other shortcode instances will run uninterrupted.

[open_now reload=true]We’re open now so please drop into our shop![/open_now]
We’re open now so please drop into our shop!

By default, there is no HTML present when the status doesn’t match. You can choose to set the hidden content to remain present in the element’s data.

[open_now remove_html=false]We’re open! <em>(HTML visible in source code)</em>[/open_now] [closed_now remove_html=false]Sorry, we’re closed <em>(HTML visible in source code)</em>[/closed_now]

We’re open! (HTML visible in source code) Sorry, we’re closed (HTML visible in source code)

Each shortcode has the parameter: class="open-text" for illustrative purposes only. As a reference, the opening hours are: Monday – Friday: 09:00 – 18:00; Saturday: 09:00 – 14:30; Sunday: Closed. and the time is: 12:43.

The time right now

What is the time right now?

<p class="open-text">[open_text]%now%[/open_text]</p>

12:43

As this is simply text, this shortcode and its content exists within a standard paragraph block rather than in a shortcode block.

If you are experiencing problems with out-dated versions of your page, please start with this shortcode to identify the issue with either your cache or the incorrect timezone.

This website is running on the timezone: Europe/London so it is either GMT (GMT+0) or BST (GMT+1).

Replacement text and logic

You can do a lot with replacement text and logic!

<p class="open-text">[open_text]
%if_open_now% We are currently open, so pop in! %end%
%if_open_later% We are currently not open, but we will be open today at: %today_next%. %end%
%if_closed_now%
    %if_not_open_later% We are currently not open for the remainder of the day
        %if_open_tomorrow%, however we are open tomorrow at %tomorrow_start%.
        %else% and closed tomorrow. %end%
    %end%
%end%
[/open_text]</p>

We are currently open, so pop in!

Additional spacing is added for readability. When processed, spaces before and after logic statements are removed.

Replacement text reference

There is plenty of text to play around with… here is a complete list of all the text replacement codes, their current values and a description.

Code Value Description
%now% 12:43 Formatted current time
%hours_today% 09:00 – 14:30 Formatted list of hours for today
%hours_tomorrow% Closed Formatted list of hours for tomorrow
%today_start% 09:00 Formatted opening for today
%today_end% 14:30 Formatted last closing time for today
%today_next% 14:30 Formatted next opening or closing time today
%today% Saturday Today’s day name
%tomorrow% Sunday Tomorrow’s day name
%tomorrow_start% Formatted first opening time for tomorrow
%tomorrow_end% Formatted closing time for tomorrow
%seconds% 6361 Seconds until either change in opening or closing status
%seconds_padded% 6361 Seconds with 2-digit padding for remaining time for change in opening or closing status
%seconds_divisor% 1 Seconds as a divisor until either change in opening or closing status — useful when displayed with minutes
%seconds_divisor_padded% 01 Seconds as a divisor with 2-digit padding for remaining time for change in opening or closing status — useful when displayed with minutes
%minutes% 106 Minutes until either change in opening or closing status
%minutes_padded% 106 Minutes with 2-digit padding for remaining time for change in opening or closing status
%minutes_divisor% 46 Minutes as a divisor until either change in opening or closing status — useful when displayed with hours
%minutes_divisor_padded% 46 Minutes as a divisor with 2-digit padding for remaining time for change in opening or closing status — useful when displayed with hours
%hours% 1 Hours until either change in opening or closing status
%hours_padded% 01 Hours with 2-digit padding for remaining time for change in opening or closing status
%days% 0 Days until either change in opening or closing status
%space% Space character
%comma% , Comma character
%colon% : Colon character
%semicolon% ; Semi-colon character
%exclamation% ! Exclamation mark character
%question% ? Question mark character
%fullstop% . Fullstop/period character
%percent% % Percent character