Out of the box, WordPress offers several primary types of content: posts, pages, and attachments. WordPress refers to all of these as "post types". Why is a page a type of post? Well, our best guess is that the naming convention stems from the fact that posts, pages, and attachments are all stored in the wp_posts
table in the database. Examine the contents of that table by issuing the following query in your MySQL client:
SELECT * FROM wp_posts;
The contents of the post_type
column will tell you the type of any given "post". Whether it is a post, a page, or an attachment, the data is stored in the wp_posts
table and it all has the same attributes (that is columns). Perhaps a more descriptive name for this table would have been wp_content
, but for the sake of uniformity, we will defer to WordPress' naming conventions as much as possible.
You may have even spotted a few other post types in your database, such as "revision", but don't worry about them too much for...