WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use wp_update_post() in a Frontend Page. The first part of the function works as expected. post_content and/or post_title will be changed in wp_posts. But the function does not create a revision copy from the old table item as described in the WP Function Reference.

Here is my code

$upd_post = array();
$upd_post['ID'] = $post->ID;
$upd_post['post_title'] = $wp_query->query_vars['4tn_title'];
$upd_post['post_content'] = $wp_query->query_vars['4tn_content'];
$update_result = wp_update_post( $upd_post );

Perhaps it doesn't work because the post_type is a cutom-type 'portfolio' instead 'post'.

If this is the reason what is to do for getting a 'revisioncopy' for portfolio-items

share|improve this question

The supports parameter for the post type has to ask for revisions.


        'supports' => array ( 'revisions' ) 
share|improve this answer
it works thank you. – j.oberle Nov 18 '12 at 10:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.