Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using following code to register new taxonomy for WP-Post.

function qc22_build_taxonomies(){
        register_taxonomy(__( "fullscreen-tags" ), array(__( "fullscreen" )), array("hierarchical" => true, "label" => __( "Fullscreen Tags" ), "singular_label" => __( "Skill Type" ), "rewrite" => array('slug' => 'fullscreen-tags', 'hierarchical' => true))); 
    }
    function qc22_fullscreen_edit_columns($columns){  

            $columns = array(  
                "cb" => "<input type=\"checkbox\" />",  
                "title" => __( 'fullscreen Item Title' ),
                "type" => __( 'type' )
            );  

            return $columns;  
    }  
    function qc22_fullscreen_custom_columns($column){  
            global $post;  
            switch ($column)  
            {    
                case __( 'type' ):  
                    echo get_the_term_list($post->ID, __( 'fullscreen-tags' ), '', ', ','');  
                    break;
            }  
    }  

    add_action( 'init', 'qc22_build_taxonomies', 0 );
    add_filter("manage_edit-fullscreen_columns", "qc22_fullscreen_edit_columns");  
    add_action("manage_posts_custom_column",  "qc22_fullscreen_custom_columns"); 

I want to appear this taxonomy on WP-Pages also. I'm new to wordpress. Any help will be appreciated.

Thanks

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

The second parameter of register_taxonomy can accept a string or an array of post types, so simply add the page post type to that array, like so:

function qc22_build_taxonomies() {
    register_taxonomy( "fullscreen-tags", array( "fullscreen", "page" ), array( "hierarchical" => true, "label" => __( "Fullscreen Tags" ), "singular_label" => __( "Skill Type" ), "rewrite" => array('slug' => 'fullscreen-tags', 'hierarchical' => true ) ) ); 
}
share|improve this answer
    
Hey! Thanks this worked... –  MANnDAaR Aug 16 '11 at 10:00
    
Thanks @t31os for editing –  Mamaduka Aug 16 '11 at 10:20
    
No problem, didn't realise i was editting when you were also(edit times are close), sorry about that. –  t31os Aug 16 '11 at 10:48
add comment

Your Answer

 
discard

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.