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: |
|
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.
Note: See
TracTickets for help on using
tickets.
(In [12224]) Do not use the unreliable in_the_loop() when grabbing terms. fixes #11189