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

  1. metrobee
    Posted 3 years 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?


  2. Rachel Carden
    Plugin Author

    Posted 3 years 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


No tags yet.