Viewing 3 replies - 1 through 3 (of 3 total)
  • proximity2008

    (@proximity2008)

    Hi,

    Not possible with the plugin, however you should be able to remove it using a WordPress hook

    add_action( 'add_meta_boxes', 'my_remove_post_meta_boxes' );
    
    function my_remove_post_meta_boxes() {
    
    $post_id = $_GET['id'];
    if( $your_excluded_id  == $post_id ):
    	remove_meta_box( 'cftdiv', 'page', 'normal' );
    	remove_meta_box( 'cftdiv', 'post', 'normal' );
    endif;
    }

    Put that in your functions file.

    Read more about this technique here:
    http://justintadlock.com/archives/2011/04/13/uncluttering-the-post-editing-screen-in-wordpress

    Thread Starter Xavier Soler

    (@mediopirzel)

    Hi,

    Thank You for your answer. I’ll give this a try.

    Thread Starter Xavier Soler

    (@mediopirzel)

    There is a little mistake in the code.
    Instead of using $_GET[‘id’], you have to write $_GET[‘post’]

    add_action( 'add_meta_boxes', 'my_remove_post_meta_boxes' );
    
    function my_remove_post_meta_boxes() {
    
    $post_id = $_GET['post'];
    if( $your_excluded_id  == $post_id ):
    	remove_meta_box( 'cftdiv', 'page', 'normal' );
    	remove_meta_box( 'cftdiv', 'post', 'normal' );
    endif;
    }

    And It works!!!
    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Custom Field Template] How to exclude posts or pages?’ is closed to new replies.