Created
April 7, 2012 18:18
-
-
Save danlefebvre/2331100 to your computer and use it in GitHub Desktop.
Reset post data WP
This file contains hidden or 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 | |
//top of page | |
$page_query = $wp_query; | |
//... do your stuff, call WP_Query, etc. | |
//reset $wp_query to current page | |
$wp_query = $page_query; | |
wp_reset_postdata(); | |
//display content | |
the_content(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment