• Resolved dave031284

    (@dave031284)


    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
    [/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
    [/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
    [/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
    [/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
    [/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
    [/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

    (@thewanderingbrit)

    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]

    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 6 years, 11 months ago by phillipian.
    • This reply was modified 6 years, 11 months ago by phillipian.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘help with else statement’ is closed to new replies.