• Resolved Srikanth Kamath

    (@tskamath)


    <?php
          global $post;
          echo $post->ID . '<br />'; // works
          echo get_the_term_list($post->ID, 'ip_ratings', 'Camera IP Ratings: ', ', ', '' ); // does not work
         echo <?php wp_get_object_terms($post->ID, 'camera-types'); ?>
     ?>

    what am i doing incorrect.. I am using this in custom post types

    https://ww.wp.xz.cn/plugins/php-code-widget/

Viewing 1 replies (of 1 total)
  • Thread Starter Srikanth Kamath

    (@tskamath)

    marked this as solve.. my error, I had deleted all the taxonomies in ‘ip_ratings’

    just get a test with var_dump..

    <?php
          global $post;
          echo  'post ID :' . $post->ID . '<br />';
          $lists = echo get_the_term_list($post->ID, 'ip_ratings', 'Camera IP Ratings: ', ', ', '' );
          var_dump($lists); // => bool(false)
    ?>

Viewing 1 replies (of 1 total)

The topic ‘get_the_terms() does not work:’ is closed to new replies.