Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#11189 closed defect (bug) (fixed)

the_tags() does not work in custom WP_Query loops

Reported by: markjaquith's profile markjaquith Owned by:
Milestone: 2.9 Priority: high
Severity: major Version:
Component: Template Keywords:
Focuses: Cc:

Description

get_the_terms() relies on the function in_the_loop() to determine whether it should grab the global $post->ID. in_the_loop only returns true for the main $wp_query loop. Thus, a call to the_tags() will not work.

Change History (1)

#1 @markjaquith
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12224]) Do not use the unreliable in_the_loop() when grabbing terms. fixes #11189

Note: See TracTickets for help on using tickets.