CRED is a WordPress plugin that lets you easily build front-end forms for creating and editing content and users.
CRED User Guides include detailed documentation on creating forms, including related fields that belong to the content or the users, validating the input and displaying the forms with custom HTML styling.
When you ask for help or report issues, make sure to tell us the versions of the Toolset plugins that you have installed and activated.
Viewing 15 topics - 106 through 120 (of 1,572 total)
I have been able to set auto expire dates for a CPT (by updating '_cred_post_expiration_time') but I also need to set the new status of the post to private when the post expires.
Initial status is published.
How can I do that?
Solution:
I checked it and you can use the '_cred_post_expiration_time' to set the status of the CPT to draft, for example.
For example, you can add the following code where you're changing the expiration date and this should cause the effect you need:
// set expiration action to 'draft' status
$new_status_arr = array( 'post_status' => 'draft', 'custom_actions' => array() );
update_post_meta($post_id, '_cred_post_expiration_action', $new_status_arr);