strip_tags inside loop keep the 1st value assigned and doesn't update
-
I have
$args = array( 'numberposts' => '15' ); $recent_posts = wp_get_recent_posts( $args ); foreach( $recent_posts as $recent ){ $country = strip_tags( get_the_term_list( $recent->ID, 'location', '', ', ', '' ) ); etc other code
and the country variable is assigned the country taxonomy of 1st post queried, and doesn’t refresh for the remaining posts…. any idea why?
cheers
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘strip_tags inside loop keep the 1st value assigned and doesn't update’ is closed to new replies.