Created
December 13, 2011 17:06
-
-
Save billrobbins/1472956 to your computer and use it in GitHub Desktop.
Add Content From Specific Page
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 if (is_home()) { ?> | |
<?php | |
// Query for Home Page Content | |
$the_query = new WP_Query( 'pagename=home' ); | |
// The Loop | |
while ( $the_query->have_posts() ) : $the_query->the_post(); ?> | |
<h2><?php the_title(); ?></h2> | |
<?php the_content(); ?> | |
<?php endwhile; | |
// Reset Post Data | |
wp_reset_postdata(); | |
?> | |
<div class="clear"></div> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment