Support

Account

Forum Replies Created

  • Hi,

    Revisions where also missing for me on frontend posting with ACF.

    If it helps, I just test successful to call an ACF function to copy metadata from post to revision.
    Perhaps it’s better to add action to ‘save_post’ because _wp_put_post_revision() should not be used by theme or plugin.

    add_action('save_post', 'custom_save_post', 20);
    function custom_save_post( $post_id ) {
    	// only on front-end
    	if( is_admin() ) {
    		return;
    	}
    	
    	$parent_id = wp_is_post_revision( $post_id ); //return False if not a revision, ID of revision's parent otherwise.
    	
    	if ( $parent_id ) {
    		acf_copy_postmeta( $parent_id, $post_id ); //This function will copy meta from a post to it's latest revision
    	}
    }
  • Hi,
    Try to use the wordpress get_posts() function, then get the fields values for each posts and then you can display the links.
    Hope this help

Viewing 2 posts - 1 through 2 (of 2 total)