• I have post type with taxonomies which are included in posts. I want to print the taxonomy names in post short info.

    This is registered post type

    register_taxonomy($post_type . '_fuel_type', array($post_type), array(
            'hierarchical' => false,
            'labels' => array
            (
                'name' => TF_SEEK_HELPER::get_option('seek_property_name_singular') .' '.__( 'Fuel Types','tfuse' ),
                'singular_name' => TF_SEEK_HELPER::get_option('seek_property_name_singular') .' '. __( 'Fuel Type','tfuse' ),
                'search_items' =>  __( 'Search','tfuse'). ' ' . TF_SEEK_HELPER::get_option('seek_property_name_singular') .' '.__('Fuel Types','tfuse' ),
                'all_items' => __( 'All','tfuse') .' '. TF_SEEK_HELPER::get_option('seek_property_name_singular') .' '. __('Fuel Types','tfuse' ),
                'edit_item' => __( 'Edit','') .' '. TF_SEEK_HELPER::get_option('seek_property_name_singular') .' '. __('Fuel Type','tfuse' ),
                'update_item' => __( 'Update','tfuse') .' '. TF_SEEK_HELPER::get_option('seek_property_name_singular') .' '. __('Fuel Type','tfuse' ),
                'add_new_item' => __( 'Add New Type','tfuse' ),
                'new_item_name' => __( 'New','tfuse') .' '. TF_SEEK_HELPER::get_option('seek_property_name_singular') .' '. __('Fuel Type Name','tfuse' ),
                'menu_name' => __('Fuel Types','tfuse' ),
            ),
            'show_ui'   => true,
            'public'    => true,
            'query_var' => true,
            'rewrite' => array(
                'slug' => apply_filters( 'tfuse_car_fuel_slug', $post_type . '_fuel' ),
                'with_front' => true
            ),
            'capabilities'  => array(
            )
        )
    );

    And this is the code to show it
    $fuel = TF_SEEK_HELPER::get_post_option('car_fuel_type','labels', $car->ID);

    But all i get is ‘labels’, what i have to write there to get names?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘print taxonomy name’ is closed to new replies.