Home Forums Backend Issues (wp-admin) Scheduling content updates of "Global Options" Reply To: Scheduling content updates of "Global Options"

  • It seems the forum at my post, let’s try it again

    To get the same effect with an options page you would probably need to build your own plugin similar to the other one that has another options page to let them update the values.

    I would probably do this a simpler way by using a repeater field. I would add a data/time field to the repeater, or maybe 2, to allow the client to set dates what it should be displayed. Then when looping through the repeater I’d check the value of the field against the current date/time to see if it should be displayed.

    This has two effects

    • Only the ones in the correct date range are shown, the main goal
    • Allows reusing old entries, or modifying them for reuse in the future, which means that the client does not always need to build something from scratch.

    The main issue with this method is that if you’re not already using a repeater and showing multiple items where this is used then it will need to be rebuild to do so. Or you could limit the display to the first entry that meets the criteria, but this would still mean rebuilding a portion of your code.