-
-
Save gmazzap/77d7b4f6f7ce06fb56cc 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
<?php | |
array_walk($GLOBALS['wp_query']->posts, function($post, $i, $wp_query) { | |
$GLOBALS['post'] = $post; | |
$wp_query->the_post(); | |
// loop code | |
the_title(); | |
the_content(); | |
$wp_query->have_posts(); // this will fire 'loop_end' when needed | |
}, $GLOBALS['wp_query']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment