php - WordPress loop to include pages content instead of posts -
i developing 1 page wordpress theme, there no need display posts, it's informative page, thinking utilize static content, turned out i'll need utilize dynamic 1 in order things search work. in "pages" section of wordpres created new page contains content need, trying figure out loop include contents of page, failed. after doing research able find loops used display content of posts. there same loop, display contents of page? how include contents in page e.g. <?php something();?>
just specify post_type
within of query_posts()
parameter. example, if wanted output content of each page, this:
query_posts(array('post_type' => 'page')); while(have_posts()) { echo the_content(); }
for reference, might want check out api reference docs query_posts()
.
php wordpress loops
No comments:
Post a Comment