Set unpublish data progamaticly
-
Hi,
I am using WPallimport to import posts.
I have a the following question.After WPallimport imports a post I call a function to get the post date and a certain date. I want to set that date as the expiry date for that post in publishpress.
So my function will kind of look like this;
function my_saved_post( $post_id ) { $date = get_the_time('Y-m-d', $post_id); // The publish date is set in the feature and post are already published. We use this date for events that happen in the feature $depublishtype = 'draft'; Publish Press function to set the date( $post_id, $depublishtype ); } add_action( 'pmxi_saved_post', 'my_saved_post', 10, 3 );
So the variable $date that I am retrieving is an date in the feature. When we reach the day of the event it should be unpublished. That’s why I need a function to set it like this.
Which of your functions do i need to call?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Set unpublish data progamaticly’ is closed to new replies.