It's not working.



  • Moved the site from the old version of Wordpress, stopped designing the species:

    <?php ( get_the_term_list(get_the_ID, 'taxonomy_authors','',', ') )? printf( __( '<p class="hentry-tags">%1$s</p>', 'unspoken' ),  get_the_term_list(get_the_ID, 'taxonomy_authors','',', ') ) : ''; ?>
    

    I used to get a list of castom taxonomy tags. It doesn't turn anything out right now. At the same time, construction:

    <?php echo get_the_term_list( get_the_ID(), 'taxonomy_authors', "" ) ?>
    

    It works.

    What's the matter?



  • I think you missed it. get_the_ID() Call a function, and she always returns FALSE, because she can't find a post, and in the design, it's empty. Must be:

     <?php ( get_the_term_list(get_the_ID(), 'taxonomy_authors','',', ') )? printf( __( '<p class="hentry-tags">%1$s</p>', 'unspoken' ),  get_the_term_list(get_the_ID, 'taxonomy_authors','',', ') ) : ''; ?>
    

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2