Title: help with else statement
Last modified: October 28, 2017

---

# help with else statement

 *  Resolved [dave031284](https://wordpress.org/support/users/dave031284/)
 * (@dave031284)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/help-with-else-statement/)
 * Hi,
 * So I want to use this excellent plugin for my opening times. However, some shops
   are open twice a day and it’s getting messy. The main point is though I want 
   it to be able to check all opening times and if open display open text and if
   not display a closed text. this is a sample of what I have so far
 * [time-restrict-repeat type=”weekly” onday=”Monday” offday=”Monday” ontime=”11:
   30:00″ offtime=”14:00:00″]
    [We’re open – Order Now](http://spennymoor.foodtoyourdoor.co.uk)[/
   time-restrict-repeat]
 * [time-restrict-repeat type=”weekly” onday=”Wednesday” offday=”Wednesday” ontime
   =”11:30:00″ offtime=”14:00:00″]
    [We’re open – Order Now](http://spennymoor.foodtoyourdoor.co.uk)[/
   time-restrict-repeat]
 * [time-restrict-repeat type=”weekly” onday=”Wednesday” offday=”Wednesday” ontime
   =”19:00:00″ offtime=”21:00:00″]
    [We’re open – Order Now](http://spennymoor.foodtoyourdoor.co.uk)[/
   time-restrict-repeat]
 * [time-restrict-repeat type=”weekly” onday=”Thursday” offday=”Thursday” ontime
   =”11:30:00″ offtime=”14:00:00″]
    [We’re open – Order Now](http://spennymoor.foodtoyourdoor.co.uk)[/
   time-restrict-repeat]
 * [time-restrict-repeat type=”weekly” onday=”Thursday” offday=”Thursday” ontime
   =”19:00:00″ offtime=”21:00:00″]
    [We’re open – Order Now](http://spennymoor.foodtoyourdoor.co.uk)[/
   time-restrict-repeat]
 * [time-restrict-repeat type=”weekly” onday=”Friday” offday=”Friday” ontime=”11:
   30:00″ offtime=”14:00:00″]
    [We’re open – Order Now](http://spennymoor.foodtoyourdoor.co.uk)[/
   time-restrict-repeat]
 * etc etc
 * how do I get it to display “Sorry we are closed” text if no conditions matched?

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

 *  Plugin Author [Dave Clements](https://wordpress.org/support/users/thewanderingbrit/)
 * (@thewanderingbrit)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/help-with-else-statement/#post-9704490)
 * In order to add the “closed” message at all other times, add a shortcode in between
   each pair of shortcodes above that cover the times when you’re closed. For example,
   on the first one, you would do this:
 * `[time-restrict-repeat type="weekly" onday="Monday" ontime="14:00:00" offday="
   Wednesday" offtime="11:30:00"]We’re closed[/time-restrict-repeat]`
 *  [phillipian](https://wordpress.org/support/users/phillliplee/)
 * (@phillliplee)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/help-with-else-statement/#post-9807836)
 * Hello Dave
 * I am appreciative for your support but all due respect, your explanation is difficult
   to follow.
    Would you kindly provide complete solutions that works so we can 
   try it and learn.
 * Please provide instructions so that all of use can utilize your creation very
   easily and not be so cryptic.
 * I am about to uninstall this plugin and move on.
 * Thanks
    -  This reply was modified 8 years, 5 months ago by [phillipian](https://wordpress.org/support/users/phillliplee/).
    -  This reply was modified 8 years, 5 months ago by [phillipian](https://wordpress.org/support/users/phillliplee/).

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

The topic ‘help with else statement’ is closed to new replies.

 * ![](https://ps.w.org/shortcodes-to-show-or-hide-content/assets/icon-256x256.jpg?
   rev=984372)
 * [Show/Hide Content at Set Time](https://wordpress.org/plugins/shortcodes-to-show-or-hide-content/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcodes-to-show-or-hide-content/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcodes-to-show-or-hide-content/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcodes-to-show-or-hide-content/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcodes-to-show-or-hide-content/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcodes-to-show-or-hide-content/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [phillipian](https://wordpress.org/support/users/phillliplee/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/help-with-else-statement/#post-9807836)
 * Status: resolved