WordPress.org

Ready to get started?Download WordPress

Forums

CPT-onomies: Using Custom Post Types as Taxonomies
get_the_terms gives empty array (2 posts)

  1. metrobee
    Member
    Posted 1 year ago #

    Hi, i keep getting an empty array when i use get_the_terms( $post->ID, 'actors').
    On the other hand get_terms function gives me all 'actors'! But I only want those actors which are related to a post. get_terms( 'actors', 'orderby=count&hide_empty=0' ); ?>
    whats the trick?

    http://wordpress.org/extend/plugins/cpt-onomies/

  2. Rachel Carden
    Member
    Plugin Author

    Posted 1 year ago #

    Well, get_terms() is supposed to give you all the terms so it's doing its job just fine.

    get_the_terms() is supposed to give you all the terms assigned to a post.

    Have you checked out the "Troubleshooting" section of the "Help" dropdown in the admin?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.