Tagged: Portfolio
Hi,
Is there a way to assign an expiry date to a portfolio entry? After this date, the entry should be reverted to draft. For posts, this can be done with a plugin. Is there something similar for portfolios?
Thank you.
Kind regards
Nadja
Hey NadjaJacke,
Thank you for the inquiry.
This option is not available in the theme by default but you might be able to use a plugin to schedule an expiration for any post type. Please check this one.
// https://wordpress.org/plugins/post-expirator/
If you want to do it manually, you can use the wp_update_post function.
// https://developer.wordpress.org/reference/functions/wp_update_post/
// https://developer.wordpress.org/reference/functions/wp_insert_post/
The “post_status” has to be reverted back to “draft”.
Best regards,
Ismael
Hey Ismael,
Thank you very much! That’s exactly what I was looking for.
Best regards,
Nadja