WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a page called "About Us" with some static content. I want to display that static content on the home page. Would I need to do a custom query that returns the about page, or is there a better way?

$about_page = new WP_Query('p=7'); // is this basically it? 

Is there a better way to do this? A more dynamic way that would allow me to distribute this theme to others who don't have a specific ID for an About page.


Found this page on the Codex. It recommends using the get_page function.

share|improve this question
There are so many ways to implement this. The best approach is entirely dependent on your specific use-case. Question: are you displaying the "About Us" page, or merely pulling its content into your site front page? – Chip Bennett Oct 19 '11 at 15:29
Pulling. here's the site: adultdatinghistory.com Left hand side, the section called "welcome to {site name}" is pulled. – 21zna9 Oct 21 '11 at 3:48
up vote 0 down vote accepted

If you're using WP_Query, then assign that page a custom meta key 'home_content' with a value as 1. Then use WP_Query's custom field parameters to loop over it. If you can restrict the title as 'About' everywhere, use get_page_by_title, and if you can restrict the slug as 'about', use get_page_by_path. These methods will work dynamically.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.