Support » Plugin: Timed Content » Display Content On Specific time only

  • Resolved Yash Baldawa

    (@baldawayash15)


    Hey there,
    How can I show content everyday on specific time only and hide it on specific time on all dates based on hours basis.

    Thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    I’m not sure if I really understand your question. Can you show an example?

    With the existing rules you can create a rule which shows content on every day at a specific time. But at all other times the content is hidden then.

    So what do you mean with “hide it on specific time on all dates based on hours basis”?

    Apologies for the misunderstanding. I need to create 4 different rules for each day at different time intervals. Say for example time between Morning 12 to evening 6 some content to be shown and thereafter 6 to 12 another content to be shown and the previous content to be get hidden.

    Hope it might get you😀

    Plugin Author Arno Welzel

    (@awelzel)

    Just create the two rules and use them.

    Rule 1:

    Start at 2019-05-27, 0:00
    End at 2019-05-27, 18:00
    Action: Show
    Repeating pattern: daily, every 1 day
    Stopping condition: After 3650 times (10 years)

    Rule 2:

    Start at 2019-05-27, 18:00
    End at 2019-05-28, 0:00 (the next day is important as 0:00 is already one day further)
    Action: Show
    Repeating pattern: daily, every 1 day
    Stopping condition: After 3650 times (10 years)

    Then embed the content with approprate shortcodes – let’s assume the rules have ID 1 and 2:

    [timed-content-rule id="1"]
    
    Your content for 12 am to 6 pm here
    
    [/timed-content-rule]
    [timed-content-rule id="2"]
    
    Your content for 6 pm to 12 am here.
    
    [/timed-content-rule]

    Edit: you may also use the shortcudes without line break:

    [timed-content-rule id="1"]
    
    Your content for 12 am to 6 pm here
    
    [/timed-content-rule][timed-content-rule id="2"]
    
    Your content for 6 pm to 12 am here.
    
    [/timed-content-rule]

    You just need to define the rules accordingly and you can use “Show projected dates/times” in the rule editor to check wether the rule is defined properly.

    Hey there,
    Thanks😀for the valuable information. Will check this out.

    Hey @awelzel
    Thanks.. it now works as expected. Just a question? Can I use this shortcode on my custom templates using do_shortcode method?

    Plugin Author Arno Welzel

    (@awelzel)

    Thanks for the feedback.

    Yes, do_shortcode should work as well.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.