Wordpress

Display Single Page’s Content in WP

TAGs: 0 Comment

Posted By: eligeske on in Wordpress

Despite looking around on the web it is really hard to find just the basic query syntax for adding a single wordpress’ page content to your own page. I guess it is so simple that when anyone figures it out they don’t post about it.

Here it is:

<?php query_posts('page_id=11'); /* assign page id */ ?>
<?php if(have_posts) : the_post(); /* start the loop */ ?>
<?php the_content(); /* prints the content */ ?>
<?php endif; /* end the loop */ ?>

REMEMBER THIS IS FOR PAGEs and NOT POSTS

0 Responses to "Display Single Page’s Content in WP"

"SHARING IS CARING"

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Learning DHTMLX Suite UI

Learn the foundation of the DHTMLX Suite quickly while building a single page application with multiple components in harmony.

Popular post