Two kinds of content
WordPress has two built-in types of content, and choosing the right one keeps a site tidy:
| Posts | Pages | |
|---|---|---|
| Good for | news, articles, tutorials, updates | About, Contact, Services, Privacy Policy |
| Time | dated; listed newest first | timeless |
| Where they appear | the blog, archives, feeds, category and tag pages | wherever you link them, often in menus |
| Organised with | categories and tags | parent and child pages |
A simple test: if it would make sense to show it in a list of "latest" items with a date, it is a post. If it is a fixed part of the site, it is a page.
Creating content
In the dashboard, Posts → Add New Post and Pages → Add New Page open the block editor (next lesson). You type a title, write the content, and use the Publish button.
The same can be done with WP-CLI, which is handy for showing exactly what WordPress stores:
wp post create --post_title="Opening hours this summer" --post_content="We are open 9am to 6pm, Monday to Saturday." --post_status=publish
wp post create --post_type=page --post_title="About us" --post_status=publish
wp post list --fields=ID,post_type,post_title,post_name,post_statusSuccess: Created post 4.
Success: Created post 5.
+----+-----------+---------------------------+---------------------------+-------------+
| ID | post_type | post_title | post_name | post_status |
+----+-----------+---------------------------+---------------------------+-------------+
| 4 | post | Opening hours this summer | opening-hours-this-summer | publish |
| 1 | post | Hello world! | hello-world | publish |
+----+-----------+---------------------------+---------------------------+-------------+Notice the post_name column: the slug, the part of the address made from the title. "Opening hours this summer" became opening-hours-this-summer, so the post's address is /opening-hours-this-summer/. You can edit the slug in the editor's sidebar; shorter slugs are easier to share.
wp post list shows posts by default; add --post_type=page to list pages.
Statuses
Every post and page has a status:
- draft: saved but not public. Only logged-in users who can edit it see it.
- pending: waiting for review. Contributors cannot publish, so their posts go to pending for an editor.
- future: scheduled for a date and time; WordPress publishes it automatically then.
- private: published, but only visible to logged-in users with permission (editors and administrators).
- publish: live for everyone.
- trash: deleted, but recoverable for 30 days from Trash.
You can also protect a single post with a password under the editor's visibility setting. Visitors then need that password to read it.
Scheduling shows the future status at work:
<?php
$id = wp_insert_post( [
'post_title' => 'Summer sale starts',
'post_content' => 'Everything 20% off.',
'post_status' => 'publish',
'post_date' => '2030-06-01 09:00:00',
] );
$post = get_post( $id );
echo $post->post_status, " | ", $post->post_date, "\n";future | 2030-06-01 09:00:00Although we asked for publish, the date is in the future, so WordPress stored it as future. On the date, it changes to publish by itself. Set your site's time zone in Settings → General first, so "9:00" means your 9:00.
Pages with parents
Pages can be nested. A page's parent becomes part of its address, which gives a site a clear structure:
<?php
$services = wp_insert_post( [ 'post_type' => 'page', 'post_title' => 'Services', 'post_status' => 'publish' ] );
$design = wp_insert_post( [ 'post_type' => 'page', 'post_title' => 'Web design', 'post_status' => 'publish', 'post_parent' => $services ] );
echo get_permalink( $design ), "\n";http://localhost:8080/services/web-design/In the editor, set the parent in the page's sidebar under Page Attributes (or Parent in newer versions). The child page's address now includes the parent's slug.
Excerpts and featured images
Two more fields matter wherever posts are listed:
- The excerpt is a short summary shown on blog listings and in search results. If you leave it empty, WordPress makes one from the start of the content.
- The featured image represents the post in listings, at the top of the post in many themes, and when the post is shared on social media.
Both are in the editor's sidebar for posts. Write excerpts by hand for important posts; an automatic one often cuts off mid-thought.
Revisions
When you update a post, WordPress keeps a revision: a copy of the content as it was saved. In the editor, Revisions in the sidebar opens a comparison screen where you can see what changed between versions and restore an earlier one.
<?php
$id = wp_insert_post( [ 'post_title' => 'Prices', 'post_content' => 'Basic plan: 500', 'post_status' => 'publish' ] );
wp_update_post( [ 'ID' => $id, 'post_content' => 'Basic plan: 650' ] );
wp_update_post( [ 'ID' => $id, 'post_content' => 'Basic plan: 700' ] );
foreach ( wp_get_post_revisions( $id ) as $revision ) {
echo $revision->post_type, ": ", $revision->post_content, "\n";
}revision: Basic plan: 700
revision: Basic plan: 650Each update stored a revision holding the content as it was saved, newest first. Notice that the original "500" has no revision of its own: this post was created by code and revisions are made when a post is updated, so a version only becomes restorable once it has been saved over. Revisions are rows in wp_posts with the type revision. On large sites they add up; you can limit them with define( 'WP_POST_REVISIONS', 10 ); in wp-config.php.
The front page
By default, the home page shows your latest posts. Most business sites want a fixed page instead. In Settings → Reading, choose A static page, then pick a page for the Homepage and, if you have a blog, another page for Posts. With WP-CLI:
wp option update show_on_front page
wp option update page_on_front 2
wp option get show_on_frontSuccess: Updated 'show_on_front' option.
Success: Updated 'page_on_front' option.
pagePage 2 is the "Sample Page" every site starts with. Block themes can also design the front page directly in the Site Editor, covered later.
Common mistakes
- Making everything a page, which loses dates, archives and feeds for content that is really news.
- Publishing before setting the time zone, so scheduled posts go out at the wrong time.
- Long, messy slugs such as
/2026/01/this-is-a-very-long-title-copied-in-full/. - Deleting instead of drafting: unpublishing (switch to draft) keeps the content for later.
Exercise
Create a page called Services with two child pages, Web design and Hosting, and a scheduled post for next month announcing a new service. Check the child pages' addresses and the post's status.
Show one possible answer
In the dashboard: create Services and publish it; create Web design and Hosting, set Services as their parent, and publish. Their addresses become /services/web-design/ and /services/hosting/. Create the post, open the Publish date setting, pick a date next month, and click Schedule. The post list shows it as Scheduled (status future).
Key points
- Posts are dated entries shown in reverse order on the blog, in feeds and archives; pages are timeless, standalone content such as About or Contact.
- Pages can have parent pages, which builds addresses like /services/web-design/.
- Every item has a status: draft, pending, private, future (scheduled) or publish.
- Revisions keep earlier versions, so you can compare and restore them.