Overview
In this module we go hands-on. We will create actual content in StreamVault — posts, pages, categories, and tags. This is not just clicking around — understanding how WordPress structures content is critical because everything in theme development and plugin development is built around this content model.
Posts — The Content Backbone
What Exactly is a Post?
In WordPress, a "post" is the base content object. Everything stored in the wp_posts table is technically a "post" — blog posts, pages, navigation menus, custom post types, even revisions. They all share the same database table with a post_type column differentiating them.
wp_posts table
├── post_type = 'post' → Blog posts
├── post_type = 'page' → Pages
├── post_type = 'movie' → Custom post type (we create later)
├── post_type = 'nav_menu_item' → Menu items
├── post_type = 'revision' → Auto-saved revisions
└── post_type = 'attachment' → Media library items
This is why understanding posts is foundational — when you later work with movies, series, episodes — they are all posts under the hood with a custom post_type.
Creating Your First Post
Go to Posts → Add New
You will see the Block Editor. Let us create a sample blog post for StreamVault:
Title: Top 10 Movies to Watch This Weekend
Content blocks:
[Paragraph] StreamVault brings you the best selection...
[Heading] Action Movies
[Paragraph] Here are our top picks for action lovers...
[Heading] Drama Movies
[Paragraph] If you prefer something more emotional...
Post Settings — Right Sidebar
On the right sidebar under the Post tab:
Status & Visibility
Visibility: Public / Private / Password Protected
Publish: Immediately / Schedule for later
Stick to top: [ ] Stick this post to the front page
Pending review:[ ] Flag this post for review
Visibility options:
- Public — everyone can see it
- Private — only admins and editors can see it
- Password Protected — visitors need a password
Stick to front page — pins this post to always appear first in your blog feed regardless of date.
Permalink
URL Slug: top-10-movies-to-watch-this-weekend
View Post: https://streamvault.local/top-10-movies-to-watch-this-weekend/
The slug is auto-generated from the title. You can edit it manually. Keep slugs:
- All lowercase
- Hyphens instead of spaces
- Short and descriptive
- No special characters
Categories
[ ] Uncategorized ← default
[ ] Movie Reviews
[ ] News
[ ] Recommendations
+ Add New Category
Every post must have at least one category. If you do not assign one, WordPress uses "Uncategorized" automatically.
Tags
[ Tag input field ]
Add: action, weekend, recommendations
Suggested tags: movies, streaming, watch
Tags are flat (no hierarchy) and optional. Use them for specific keywords.
Featured Image
[ Set featured image ]
Click this, upload an image or select from media library. This becomes the post thumbnail — shown in blog listings, social sharing previews, and wherever the_post_thumbnail() is called in your theme.
Excerpt
[ Write an excerpt (optional) ]
A short manual summary of the post. If you leave it empty, WordPress auto-generates one from the first 55 words of your content. Used in blog listings with the_excerpt().
Post Statuses
A post can have these statuses:
|
Status |
Meaning |
|
Draft |
Saved but not
visible to public |
|
Pending |
Written by
author, waiting for editor approval |
|
Published |
Live and
visible to public |
|
Scheduled |
Will publish
automatically at a future date/time |
|
Private |
Published but
visible to admins/editors only |
|
Trash |
Deleted, kept
for 30 days before permanent deletion |
Hands On — Create These Posts
Create the following posts for StreamVault:
Post 1:
Title: Top 10 Action Movies of 2024
Category: Movie Reviews
Tags: action, 2024, top-10
Status: Published
Post 2:
Title: New Releases This Month on StreamVault
Category: News
Tags: new-releases, streaming
Status: Published
Post 3:
Title: Best Thriller Series to Binge Watch
Category: Recommendations
Tags: thriller, series, binge-watch
Status: Draft
Categories — Hierarchical Organization
What Are Categories?
Categories are the primary way to organize posts. They are hierarchical — meaning you can have parent categories and child categories.
Entertainment ← Parent category
├── Movie Reviews ← Child category
├── Series Reviews ← Child category
└── News ← Child category
├── Platform News ← Grandchild category
└── Industry News ← Grandchild category
Every post must have at least one category. A post can have multiple categories.
Managing Categories
Go to Posts → Categories
+--------------------------------------------------+
| Add New Category |
|--------------------------------------------------|
| Name: Movie Reviews |
| Slug: movie-reviews |
| Parent: Entertainment ▼ |
| Description: Reviews of latest movies |
| |
| [ Add New Category ] |
+--------------------------------------------------+
Existing Categories:
Name Slug Posts
Uncategorized uncategorized 0
Entertainment entertainment 0
Movie Reviews movie-reviews 2
News news 1
Recommendations recommendations 1
Fields explained:
|
Field |
Purpose |
|
Name |
Display name
shown on frontend |
|
Slug |
URL-friendly
version — /category/movie-reviews/ |
|
Parent |
Makes this a
child of another category |
|
Description |
Optional,
some themes display this on archive pages |
Hands On — Create These Categories
Category 1:
Name: Entertainment
Slug: entertainment
Parent: None
Category 2:
Name: Movie Reviews
Slug: movie-reviews
Parent: Entertainment
Category 3:
Name: Series Reviews
Slug: series-reviews
Parent: Entertainment
Category 4:
Name: News
Slug: news
Parent: None
Category 5:
Name: Recommendations
Slug: recommendations
Parent: None
Category Archive URLs
Once categories exist, WordPress automatically creates archive pages for them:
https://streamvault.local/category/entertainment/
https://streamvault.local/category/movie-reviews/
https://streamvault.local/category/news/
These pages list all posts belonging to that category. The template that renders these pages is archive.php (or category.php — we cover this in Theme Development).
Tags — Flat Keywords
What Are Tags?
Tags are flat keywords — no hierarchy, no required assignment. They describe specific details about a post that categories do not cover.
A post about "Inception" might have:
Category: Movie Reviews
Tags: christopher-nolan, sci-fi, mind-bending, 2010, leonardo-dicaprio
Think of categories as broad topics and tags as specific descriptors.
Categories vs Tags — The Key Difference
|
Categories |
Tags |
|
|
Hierarchy |
Yes
(parent/child) |
No (all flat) |
|
Required |
Yes (at least
one) |
No (optional) |
|
Purpose |
Broad topics |
Specific
keywords |
|
Example |
"Movie
Reviews" |
"christopher-nolan" |
|
URL |
/category/movie-reviews/ |
/tag/christopher-nolan/ |
Managing Tags
Go to Posts → Tags
+------------------------------------------+
| Add New Tag |
|------------------------------------------|
| Name: christopher-nolan |
| Slug: christopher-nolan |
| Description: Films directed by... |
| |
| [ Add New Tag ] |
+------------------------------------------+
Tags can also be created inline while writing a post — just type in the tag field and press Enter.
Tag Archive URLs
Just like categories, tags get automatic archive pages:
https://streamvault.local/tag/christopher-nolan/
https://streamvault.local/tag/sci-fi/
https://streamvault.local/tag/2024/
Pages — Static Content
What Are Pages?
Pages are for static, timeless content that does not belong in the blog feed.
StreamVault pages we will need:
├── Home ← Homepage (static)
├── Movies ← Browse all movies
├── Series ← Browse all series
├── About ← About StreamVault
├── Contact ← Contact form
├── Privacy Policy ← Legal page
└── Terms of Use ← Legal page
Creating a Page
Go to Pages → Add New
The editor looks identical to the post editor. The difference is in the right sidebar — Pages do not have Categories or Tags. Instead they have:
Page Attributes
├── Parent Page: [ No parent ▼ ] ← For hierarchy
└── Order: [ 0 ] ← Manual sort order
Page Hierarchy
Pages can be nested — a child page's URL includes the parent:
Parent: /about/
Child: /about/team/
Child: /about/careers/
Hands On — Create These Pages
Page 1:
Title: Home
Slug: home
Leave content empty for now
Page 2:
Title: Movies
Slug: movies
Content: Browse our complete movie collection.
Page 3:
Title: Series
Slug: series
Content: Explore all web series available on StreamVault.
Page 4:
Title: About
Slug: about
Content: StreamVault is your ultimate streaming destination.
Page 5:
Title: Contact
Slug: contact
Content: Get in touch with us.
Set a Static Homepage
Now that we have a Home page:
Go to Settings → Reading
Your homepage displays:
○ Your latest posts
● A static page
Homepage: [ Home ▼ ]
Posts page: [ -- ▼ ]
Select "A static page" and choose "Home" as the homepage. Save changes.
Now https://streamvault.local/ shows your Home page instead of the blog feed.
The Difference in Database
Understanding how posts and pages differ in the database helps you later when writing WP_Query:
-- Blog posts
SELECT * FROM sv_posts WHERE post_type = 'post' AND post_status = 'publish';
-- Pages
SELECT * FROM sv_posts WHERE post_type = 'page' AND post_status = 'publish';
-- All content
SELECT ID, post_title, post_type, post_status FROM sv_posts;
Both live in the same wp_posts table — the post_type column is the only difference.
Quick Edit
In the Posts or Pages list screen, hovering over any item reveals a Quick Edit option. This lets you change title, slug, date, categories, tags, and status without opening the full editor.
Title │ Quick Edit │ Trash │ View
Very useful for bulk changes.
Bulk Actions
On the Posts list screen, you can select multiple posts and apply bulk actions:
Bulk Actions ▼ [ Apply ]
Options:
- Edit
- Move to Trash
Bulk Edit lets you change category, tags, author, status, and comment settings for multiple posts at once.
Summary
- Posts are time-based content — they have categories, tags, dates, and appear in the blog feed.
- Pages are static content — hierarchical, no categories/tags, do not appear in blog feed.
- Both posts and pages live in the
wp_poststable — differentiated by thepost_typecolumn. - Categories are hierarchical and required on posts. Tags are flat and optional.
- Set
Settings → Reading → Static Pageto show a custom homepage instead of the blog feed. - Post statuses — Draft, Pending, Published, Scheduled, Private, Trash.
- Featured image, excerpt, and permalink are set per post in the right sidebar.
No comments:
Post a Comment