I am developing a one page WordPress theme, there is no need to display any posts, it’s just informative page, I was thinking to use static content, but it turned out that I’ll need to use dynamic one in order for things like search to work. In “pages” section of WordPres I created a new page which contains all the content I need, I was trying to figure out a loop to include contents of that page, but failed. After doing a research I was only able to find loops used to display content of posts. So is there same loop, but to display contents of page? Also How would I than include those contents in a page e.g.
<?php something();?>
I am developing a one page WordPress theme, there is no need to display
Share
Just specify the
post_typeinside of thequery_posts()parameter. For example, if you wanted to output the content of each page, you could do this:For reference, you might want to check out the API Reference Docs for
query_posts().