Support » Plugin: Timed Content » Request: Ability to stack rules

  • Resolved Iamdez

    (@iamdez)


    I have a complex set of rules to setup:

    Rule 1: Weekends: Show ContentA
    Rule 2: M-F 12:00am – 4:59am: Show ContentA
    Rule 3: M-F 10:46am – 11:59pm: Show ContentA
    Rule 4: M-F 5:00am – 10:46am: Show ContentB

    I tried the following:
    [timed-content-rule id="1,2,3"]

    but when I mixed it up and put two rules after rule 4 (next example) I found that it only respects the first rule listed

    [timed-content-rule id="4,1,2"]

    http://wordpress.org/plugins/timed-content/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor K. Tough

    (@kjvtough)

    There’s no support for combining rules like that currently, but maybe in the future. I’ll have to give it some thought.

    Meanwhile, what you could try instead of your first example is this:

    Rule 5: M-F 5:00am – 10:46am: Hide ContentA

    That is, whenever you’re showing ContentB, you’re hiding ContentA, and vice-versa.

    -K

    Thread Starter Iamdez

    (@iamdez)

    Agreed. I thought about doing that, but it still involves having multiple blocks on the page, which is my real reason for wanting the feature.

    Currently

    [timed-content-rule id="1"]
    Ordering isn't available
    [/timed-content-rule]
    [timed-content-rule id="2"]
    Ordering isn't available
    [/timed-content-rule]
    [timed-content-rule id="3"]
    Ordering isn't available
    [/timed-content-rule]
    [timed-content-rule id="4"]
    ORDERING IS HERE!
    [/timed-content-rule]
    Plugin Contributor K. Tough

    (@kjvtough)

    Going by your specific example, I don’t think there’s any way of getting around having multiple blocks, even with combining rules, because you have different content displaying at different times. What I was getting at with Rule 5 is that it’s logically equivalent to combining your Rules 1, 2, and 3. At least that way, you’re not repeating yourself.

    So, if you set up Rule 5 like above, your post might look like this:

    [timed-content-rule id="5"]
    Ordering isn't available
    [/timed-content-rule]
    [timed-content-rule id="4"]
    ORDERING IS HERE!
    [/timed-content-rule]

    Having said all that, I do see some merit in being able to combine rules like you describe (fr.ex., if you wanted to show something on Tuesdays from noon to 3:00 PM and Thursdays from 11:00 AM to 2:00 PM). A future release, perhaps?

    -K

    Thread Starter Iamdez

    (@iamdez)

    Thanks for the tip on showing/hiding. Still wrapping my brain around the logic, but I think I’ve got it.

    Stacking would be awesome for a future release. The flexibility would be killer.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Request: Ability to stack rules’ is closed to new replies.