Created
August 10, 2017 18:06
-
-
Save ShahinAhmed7/b1af0e328b3d1003702a7f9dd37e112a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$secondary_query = new WP_Query( 'category_name=example-category' ); | |
// The second loop. if ( $secondary_query->have_posts() ) | |
echo '<ul>'; | |
while ( $secondary_query->have_posts() ) : | |
$secondary_query->the_post(); | |
echo '<li>' . get_the_title() . '</li>'; | |
endwhile; | |
echo '</ul>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment