• Resolved honoluluman

    (@honoluluman)


    Hello,

    Thank you for your plugin. I would like to ask you if it would be possible to show an element all the time and then for specific time and day to override with another element. For example:

    [time-restrict-repeat ALL THE TIME]
    We are closed
    
    [time-restrict-repeat type="weekly" onday="Monday" offday="Monday" ontime="10:00:00" offtime="11:15:00"]
    We are open.
    [/time-restrict-repeat]
    
    [/time-restrict-repeat]
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Dave Clements

    (@thewanderingbrit)

    Sure. Set it up to show your open hours and in that same shortcode, use the else attribute to say “We are closed”

    Thread Starter honoluluman

    (@honoluluman)

    Thank you Dave for your answer. Could you give me an example of that?

    What i actually trying to do is

    [time-restrict-repeat ALL THE TIME]
    [use an element with a shortcode]
    
    [time-restrict-repeat type="weekly" onday="Monday" offday="Monday" ontime="10:00:00" offtime="11:15:00"]
    [use another element with a shortcode]
    [/time-restrict-repeat]
    
    [/time-restrict-repeat]

    I already tested the simple case of show and hide elements wrapped inside your plugins shortcode. And worked perfect.

    Thread Starter honoluluman

    (@honoluluman)

    Ok, i got the idea from an example `[time-restrict-repeat type=”weekly” onday=”Saturday” offday=”Saturday” ontime=”10:00:00″ offtime=”23:00:00″ else=”Work sucks, drink beer.”]
    It’s the weekend baby!
    [/time-restrict-repeat]`

    But what if the else attribute is an element (image,div or another shortcode)?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show something for specific time and day and else’ is closed to new replies.