Last active
December 15, 2015 00:59
-
-
Save pascalmaddin/5177045 to your computer and use it in GitHub Desktop.
WordPress - Loads the contents of another static page in WordPress
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 | |
// Der Query für die Seite mit der ID 97 (als Beispiel) | |
$my_new_query = new WP_Query( 'page_id=97' ); | |
// Loop starten | |
while ( $my_new_query->have_posts() ) : $my_new_query->the_post(); | |
the_content(); | |
endwhile; | |
// Und ein Reset - wichtig! | |
wp_reset_postdata(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment