Tag Info

New answers tagged

1

the_title() and the_permalink() are functions that automatically echoed. Use in this case get_the_title() and get_permalink(). the code should look something like this: while ( $query->have_posts($post->ID) ) : $query->the_post(); echo '<li><a href="'. get_permalink(). '">' .get_the_title() .'</a></li>'; endwhile; ...



Top 50 recent answers are included