Title: Shortcodes order
Last modified: May 3, 2020

---

# Shortcodes order

 *  Resolved [erwinteering](https://wordpress.org/support/users/erwinteering/)
 * (@erwinteering)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/shortcodes-order/)
 * Hi Noah,
 * Thanks for the quick response!
 * I would like to have three separate notifications per day:
 * Before opening: Carwash Uden opens at …
 * During opening: Carwash Uden is open until …
 * After opening: Carwash Uden opens again tommorw from …
    (and when it is closed
   tomorrow: Carwash Uden is closed tomorrow)
 * Thanks in advance!
 * Sincerely,
 * Erwin Teering
 * Hi Erwin,
 * Thanks for getting in touch.
 * Here is your question:
 * A small question, I am using the shortcode below. Is it possible to indicate 
   that when it is (for example) 8 o’clock and the location opens at 10 o’clock 
   he indicates that it will open at 10 o’clock, without indicating that it will
   be open again from 10 o’clock tomorrow?
 * Now he shows both. I would like to see one before opening, and the other after
   opening on that day
 * Is this due to the order of shortcodes or is there not (yet) a code for this?
   If not, can it be made?
 * You posted me the following shortcode and content:
 *     ```
       [open_text]
   
       %if_open% Carwash Uden is open today until %today_end% %end%
   
       %if_closed%
   
       %if_open_today% Carwash Uden opens today at %today_start% %end%
   
       %if_open_tomorrow% Carwash Uden is open again tomorrow from %tomorrow_start% %end%
   
       %if_closed_tomorrow% Carwash Uden is closed tomorrow %end%  
   
       %end%
   
       [/open_text]
       ```
   
 * Note: I presume you are removing the line breaks so the sentence works? I am 
   keeping them here for clarity. I have also indented the logic to show it more
   clearly.
 * If you only want to show that it is open today at a certain time, you only need
   to cut out the references to tomorrow. This would look something like:
 *     ```
       [open_text]
   
       %if_open% Carwash Uden is open today until %today_end% %end%
   
       %if_closed%
   
       %if_open_today% Carwash Uden opens today at %today_start% %end%
   
       [/open_text]
       ```
   
 * The ordering of the replacement logic is not important if the two bits of logic
   are mutually exclusive. Please ensure that you open and then close each logic
   statement properly.
 * Is that what you meant by your question?
 * Please can you post something on the forum if you feel it is relevant to other
   people – it is useful to have some answers public.
 * Best regards,
 * Noah Hearle
    -  This topic was modified 6 years, 1 month ago by [erwinteering](https://wordpress.org/support/users/erwinteering/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fshortcodes-order%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/shortcodes-order/#post-12778279)
 * [@erwinteering](https://wordpress.org/support/users/erwinteering/) Thanks for
   posting your question on here. I will look into your request soon.
 *  Plugin Author [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/shortcodes-order/#post-12778639)
 * [@erwinteering](https://wordpress.org/support/users/erwinteering/) There is some
   additional functionality that is required to ascertain if the current time is
   _before_ the first opening time or after the _last_ opening time of the current
   day. I will add this in a subsequent version – and better support for more than
   one set of hours per day.
 * For now, this closely resembles your request.
 *     ```
       [open_text]
       %if_open_today%
       	%if_closed%
       		Carwash Uden opens at <strong>%today_start%</strong>.
       	%end%
       	%if_open%
       		Carwash Uden is open until <strong>%today_end%</strong>.
       	%end%
       	%if_closed_tomorrow%
       		Carwash Uden is closed tomorrow from <strong>%tomorrow_start%</strong>.
       	%end%
       %end%
       %if_open_tomorrow%
       	%if_open_today%
       		%if_closed%
       			Carwash Uden opens again tommorrow from <strong>%tomorrow_start%</strong>.
       		%end%
       	%end%
       	%if_closed_today%
       		%if_closed%
       			Carwash Uden is open tomorrow from <strong>%tomorrow_start%</strong>.
       		%end%
       	%end%
       %end%
       [/open_text]
       ```
   
 * The new lines and tabs are stripped out, so if you need spacing, use the replacement
   code: `%space%`. You can replace `<strong>` with a `<span>` or just strip out.
 *  Thread Starter [erwinteering](https://wordpress.org/support/users/erwinteering/)
 * (@erwinteering)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/shortcodes-order/#post-12786662)
 * [@designextreme](https://wordpress.org/support/users/designextreme/) Thanx for
   the response!
 * The code still indicates (after closing) today’s start time and tomorrow start
   time simultaneously. I have simplified it for now and I am waiting for the update.
 * I also use the Table version now in the footer. Perfectly adaptable to your own
   taste and style! Very nice!
 * Thanks in advance!
 *  Plugin Author [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/shortcodes-order/#post-12786750)
 * [@erwinteering](https://wordpress.org/support/users/erwinteering/) I think a 
   little more logic will help here – at the moment it can’t differentiate between
   before opening and after closing. I’ll address some of this in the next version
   and subsequent versions.
 *  Plugin Author [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/shortcodes-order/#post-12786756)
 * [@erwinteering](https://wordpress.org/support/users/erwinteering/) Please leave
   a review if you like the plugin. It’s quite new so it makes a big difference!
   Thanks, Noah
 *  Plugin Author [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/shortcodes-order/#post-12814112)
 * [@erwinteering](https://wordpress.org/support/users/erwinteering/) I have added
   new functionality to version 1.5 that will handle the text as you’ve requested:
    - **%if_open_later%** » Conditional text if the business is closed, but open
      later
    - **%if_not_open_later%** » Conditional text if the business is closed and not
      open later
    - **%today%** » Replacement word for today’s day name
    - **%tomorrow%** » Replacement word for tomorrow’s day name

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Shortcodes order’ is closed to new replies.

 * ![](https://ps.w.org/opening-hours/assets/icon.svg?rev=2706372)
 * [We’re Open!](https://wordpress.org/plugins/opening-hours/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/opening-hours/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/opening-hours/)
 * [Active Topics](https://wordpress.org/support/plugin/opening-hours/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/opening-hours/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/opening-hours/reviews/)

## Tags

 * [conditional](https://wordpress.org/support/topic-tag/conditional/)
 * [conditional text](https://wordpress.org/support/topic-tag/conditional-text/)

 * 6 replies
 * 2 participants
 * Last reply from: [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/shortcodes-order/#post-12814112)
 * Status: resolved