• Okay, so i have a custom post type that is working fine. And i have a custom column on regular posts that is working fine. Problem is that the custom column is also showing up on the custom post type and i do not want that to happen… Here is the custom column code, what am i doing wrong?

    /* Display custom column */
    function display_posts_slider( $column, $post_id ) {
        if($column == "promo") {
        $post_custom=get_post_custom($post_id);
        if($post_custom["promo-image"][0]) echo '<img src="'.plugins_url('/images/tick.png', __FILE__).'">';
        }
    }
    add_action( 'manage_posts_custom_column' , 'display_posts_slider', 10, 2 );
    
    /* Add custom column to post list */
    function add_slider_column($columns) {
        return array('promo' => __('Promo Slider')) + $columns;
    
    }
    add_filter('manage_posts_columns' , 'add_slider_column');
  • The topic ‘Custom Column on post, but not on custom post type’ is closed to new replies.