Categories of a CustomPostType-Entry

Home Forums MapPress Support Categories of a CustomPostType-Entry

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14181
    Avantart
    Participant

      Chris, I get the “categories” of an entry in a Custom Post Type using this code.

      echo get_the_term_list($postid, ‘NameOfCustomPostType’, ‘ ‘, ‘ – ‘, ” );

      is it possible to get that “categories” as plain Text, not as a link, do you know how to do acchieve that?

      Cheers Connie

      #14183
      Chris
      Keymaster

        Hi, maybe one of the other terms functions would work for you? I think they usually return an object, not just the term name:

        http://codex.wordpress.org/Function_Reference/get_terms

        #14192
        Avantart
        Participant

          Thanks for the hint, I use now

          get_the_terms( $postid, 'NameOfCustomPostType' );

          and it works!

          Cheers, Connie

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.