Support » Plugin: Toolset Types - Custom Post Types, Custom Fields and Taxonomies » custom post type / taxonomy description

  • Resolved Nic Windley


    After playing around with this useful plugin I’d like to be able to output the custom post type / taxonomy description.

    I can output the title OK, however I wasn’t clear what the reference to the decription was.

    This returns the title;

    <?php post_type_archive_title( $prefix, $display ); ?>

    Can anybody advise before I start digging through code.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Nic,
    you can use this calls to get descriptions:

    // For custom taxonomy
    $my_taxonomy = get_taxonomy( ‘my-taxonomy’ );
    echo $my_taxonomy->description;

    // For custom post type
    $my_post_type = get_post_type_object( ‘my-post-type’ );
    echo $my_post_type->description;

    Thanks srdjan.

    It would be great to see another offer on WP Views Lifetime as I missed the first one.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘custom post type / taxonomy description’ is closed to new replies.