Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Whenever I am looking for information on how to handle pages, I always end up finding deprecated functions that link to the correct new functions. But those new functions are only documented in terms of how they work for manipulating posts. I have seen this page:

http://en.support.wordpress.com/post-vs-page/

but it is not very helpful when I am looking for answers like to questions like:

  • How should I get the content of a page?
  • What exactly is the title of the page; is it 'about' or 'About'? Or something else?
  • If I am using get_post how does it know if I am looking for a page or a post? Do pages and posts always have non-conflicting ids?
  • Can the WP_Post object also represent a page?

Answers to these questions would be helpful. A link to something that clearly illuminates this topic or an explanation would be even more helpful.

share|improve this question

closed as too broad by Michael, t f, kaiser Mar 4 at 10:42

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

Behind the scenes, there really isn't much difference. Both are stored in the same table, along with some other Core and custom post types, so the IDs are globally unique, at least internally for the site, and yes, a page is a WP_Object just like a post.

The post_title, technically, is the human readable title. The post_name is a normalized-- lowercase with some characters stripped and spaces replaced with dashes-- slug and is used in things like permalinks.

The only big difference I can think of is that the "Page" post type does not have categories and tags, by default (but that can be enabled), and the "Post" post type does not have "Page Attributes"

I am sure I am probably missing something but I hope that helps.

share|improve this answer

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