WordPress.org

Support

Support » Plugins and Hacks » WP eCommerce » Show items on certain days?

Show items on certain days?

Viewing 3 replies - 1 through 3 (of 3 total)
  • That’s a nice interesting problem.

    The simplest / quickest / cheapest way I can think of is to add a custom-meta called e.g. “visible_days” to relevant products and enter something like “YYNNNNN”. Then I would write a cronjob script to run at the start of the day that would use this data to “manually” change the post_status of the product to “published” or “draft” as needed.

    Thanks, Whitelamp. I’m more of a front-end guy; do you have any guidance on what the script would look like?

    Sure, from your point of view it would mostly look like an invoice <grin>. But seriously, any half-decent programmer should be able to write a script based on the above description. (Hint: I’m at whitelamp.com). The only question really is whether to write a “real” cronjob and fiddle with the database directly or write a “proper” plugin that uses wordpress’s own cron functions and post status manipulation functions. I’d guess the second way would be more robust in the long run but possibly more expensive.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show items on certain days?’ is closed to new replies.
Skip to toolbar