How to get the wordpress posts parent page information out

June 29, 2012    posts page posts parent

In many cases when your working with Wordpress you'll want to assign a specific page template to become the static page. Usually replacing the homepage with a static page as well.

You can do this in Wordpress -> settings -> reading.

When you set say 'Latest News' to be your posts page you may want to get that out at the top of the loop.

Unfortunately in some cases, you might also just settle with the default template for your Latest News page (index.php) which can make things a little more annoying.

Wordpress will fill the loop with your posts rather than information about your page. Making the title of the page unavailable. This little useful snippet of code will help you overwrite that.

blog comments powered by Disqus