Support » Plugin: Custom Post Order » [Plugin: Custom Post Order] This plugin deletes all custom post meta data

Viewing 2 replies - 1 through 2 (of 2 total)
  • OK I have now found a workaround for this so that you don’t lose your custom meta data when using this plugin.

    You must include an if statement before you use update_post_meta() so that update_post_meta() will not be run with empty meta data fields when the plugin saves the post order.

    function save_custom_featured_fields($postid) {
    	if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
    		return;
    	if(isset($_POST['featured']))
    	update_post_meta( $postid, 'featured', $_POST['featured'] );
    }
    
    add_action( 'edit_post', 'save_custom_featured_fields' );

    I hope this helps anyone else who is experiencing this problem.

    Does the currently available version of this plugin solve this issue?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Custom Post Order] This plugin deletes all custom post meta data’ is closed to new replies.