Support » Plugin: Show/Hide Content at Set Time » Brilliant!

  • This is a well thought out and easy to use plugin that works very well. I wanted to refresh market data when the market is open and not when it’s closed. What might have taken a few days to accomplish, this plugin did in just a few minutes.

    One clarification: “on” and “off” parameters specify when to show the information and not when the restriction is on or off (which is what I thought first). So when you nest one restriction within another, the outer restriction must be “on” (i.e., the information is visible) and the inner restriction can be “off” (make it invisible), but it doesn’t seem that the reverse is possible.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Dave Clements


    Hi there,

    Thanks so much for the positive and encouraging review.

    Thanks for adding this clarification for others who might have made the incorrect assumption about the on and off attributes. I’m not sure what you don’t think is possible about when you nest shortcodes, but I don’t see why it couldn’t be the way you said it could. An example would help.

    Thanks, and have a great day

    Thank you for your response.

    I was trying to show some information when the stock market was closed. I had difficulty making that work, whereas showing something when the market is open seemed much easier (“On” 9.30 to 4:00 EST as outer loop and “Off” Sat and Sun in the inner loop). So I used the latter with an “else” clause.

    Is it possible to write an expression that is “on” only when the market is closed (which involves turning the outer loop off and inner loop on)? Also, is it possible to add a shortcode to the “else” clause?

    Thank You.

    Plugin Author Dave Clements


    Sadly, shortcodes cannot be added to an attribute (like the else clause) within a shortcode because the regex that finds and processes shortcodes would get disrupted by that behaviour. This is explained in a bit more detail here.

    However, you can easily reverse your conditions to provide a message during the times that the stock market is closed. So in your case, you create another shortcode that turns on at 4pm and off at 9.30am in the “outer loop” and then off on Saturday and Sunday on the inner loop. That covers weekday nights. Then you just need a weekend shortcode, so it would be a single weekly repeating shortcode that turns on at 9.30am Saturday and turns off at 9.30am Monday. I hope that makes sense. You can follow the same general logic that I explain in this support thread.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Brilliant!’ is closed to new replies.