WordPress.org

Forums

Types
[resolved] custom post type / taxonomy description (3 posts)

  1. Nic Windley
    Member
    Posted 1 year ago #

    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.

    http://wordpress.org/extend/plugins/types/

  2. Srdjan
    Member
    Plugin Author

    Posted 1 year ago #

    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;

  3. Nic Windley
    Member
    Posted 1 year ago #

    Thanks srdjan.

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Types
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic