Skip to content

WordPress Pages, Media & Comments — Complete Management Guide

DodaTech Updated Jun 6, 2026 7 min read

WordPress pages are for static, timeless content like “About Us” or “Contact.” Unlike posts, pages live outside your blog feed and support hierarchical parent/child relationships. The Media Library stores every image, document, and video you upload, and the Comments system lets visitors engage with your content.

What You’ll Learn

  • Creating pages with parent/child hierarchies and custom templates
  • Managing the media library — upload, edit, optimize images
  • Building image galleries and configuring media settings
  • Moderating comments and configuring discussion settings

Why Page Management Matters

A website without structure is confusing. Pages form the skeleton of your site — they tell visitors where to find your About page, your Services, your Contact form. Getting this right means visitors can navigate intuitively. Comments add community engagement, turning a one-way broadcast into a conversation.

Security note: Understanding Wordpress Pages Media helps build more secure applications — a core principle at DodaTech, where tools like Durga Antivirus Pro and Doda Browser rely on solid implementation practices.

Even DodaTech’s own tutorials use hierarchical page structures. Understanding how to organize pages and manage media translates directly to building professional sites for clients or your own projects.

    flowchart LR
    A["Posts & Categories"] --> B["Pages, Media & Comments<br/><strong>You are here</strong>"]:::current
    B --> C["Themes & Appearance"]

    classDef current fill:#38bdf8,color:#0f172a,stroke-width:2px;
  
Prerequisites: WordPress installed, basic familiarity with the dashboard and block editor from the previous tutorials. You should know how to create a post.

Working with Pages

Pages are the structural backbone of a WordPress site. While posts are for time-sensitive content, pages are for content that stays put.

Creating Page Hierarchies

One of pages’ superpowers is parent/child relationships. You can create a Services page, then nest Web Design and SEO pages under it. The URL automatically reflects this structure:

/services/          → Services page (parent)
/services/web-design/  → Child of Services
/services/seo/      → Child of Services

Set this in the Page Attributes box when editing a page — choose a Parent from the dropdown.

Page Templates

Themes can provide custom templates for specific page types:

Template FilePurpose
page.phpDefault page template
page-fullwidth.phpFull-width layout (no sidebar)
template-contact.phpCustom contact form page
template-blank.phpBlank canvas for page builders

Switch templates via the Template dropdown in Page Attributes.

<?php
// Display child pages of "About Us" programmatically
$child_pages = get_pages([
    'child_of' => get_page_by_path('about-us')->ID,
    'sort_column' => 'menu_order',
    'sort_order' => 'ASC'
]);

foreach ($child_pages as $child) {
    echo '<li><a href="' . get_permalink($child->ID) . '">' . $child->post_title . '</a></li>';
}
?>

Media Library — Your Site’s Asset Hub

The Media Library is where all uploaded files live — images, PDFs, videos, audio, and documents. Think of it as a central warehouse: every file you upload is stored here, even if you don’t use it immediately.

Uploading Media

You can upload files in two ways:

  1. Directly — Go to Media → Add New and drag-and-drop files
  2. Inside an editor — When editing a post or page, click the Add Media button. Files uploaded this way are “attached” to that post but still live in the global library.

Image Sizes

WordPress automatically generates multiple sizes for every uploaded image:

SizeDimensionsUse
Thumbnail150x150 (cropped)Archive pages, grids
Medium300x300Inline content
Large1024x1024Full-width content
FullOriginalLightbox, downloads

You can add custom sizes in functions.php:

<?php
add_image_size('featured-card', 400, 250, true);  // Cropped to exact size
add_image_size('wide-banner', 1200, 400, false);  // Soft-proportional
?>

After adding a new size, use WP-CLI to regenerate thumbnails for existing images: wp media regenerate.

Editing Images

WordPress includes a built-in image editor. Click an image in the library, then click Edit Image. You can:

  • Crop — Select a region to keep
  • Rotate — Rotate left or right
  • Flip — Vertical or horizontal
  • Scale — Resize by width/height

The original is always preserved. You can restore it at any time.

Comment Moderation

Comments turn your site from a broadcast into a conversation. But without moderation, they quickly fill with spam.

Key Discussion Settings

Navigate to Settings → Discussion:

  • Comment must be manually approved — Essential for spam control. Every new comment sits in a moderation queue until you approve it.
  • Comment author must have a previously approved comment — Once you approve a user’s first comment, their future comments appear automatically.
  • Auto-close comments on old posts — Close comments after 30 days to prevent spam on old content.
  • Threaded comments — Allow nested replies (conversation threading).

Moderating Comments

The Comments screen shows all comments with status indicators:

  • Pending (yellow) — Awaiting approval
  • Approved (green) — Visible on the front end
  • Spam — Flagged as junk (moved to spam queue)
  • Trash — Soft deleted

Use bulk actions to approve or trash multiple comments at once.

Akismet Anti-Spam

Akismet comes bundled with WordPress. It checks every comment against a global spam database. Activate it, get a free API key, and let it automatically filter spam into a separate folder.

Common Mistakes

1. Not Setting a Featured Image

Skipping the featured image means your page shows up without a thumbnail in archives and social shares. Many themes rely on the_post_thumbnail() for the hero image layout.

2. Orphaned Media Files

Deleting a post doesn’t delete its attached media files. Over time, the Media Library fills with unused images. Use a plugin like Media Cleaner to find and remove orphans.

3. Allowing Spam Unchecked

Leaving comments without moderation (and no Akismet) means spam bots flood your site. Always enable “Comment must be manually approved” at minimum.

4. Overlooking Alt Text

Alt text helps screen readers describe images to visually impaired users and helps search engines understand image content. Always fill it in when inserting images.

5. Using Full-Size Images

Inserting the Full Size image on every page slows load times dramatically. Use Medium or Large inline and link to the full file for lightbox viewing.

Practice Questions

  1. How do you make a page a child of another page?
    Answer: Set the Parent in the Page Attributes box. The child page’s URL becomes /parent-slug/child-slug/.

  2. What happens to attached media when you delete a post?
    Answer: Nothing — the media remains in the library as “unattached.” You must manually clean up orphaned files.

  3. Why set “Comment author must have a previously approved comment”?
    Answer: It prevents spam by requiring manual approval for first-time commenters while allowing trusted users to comment freely afterward.

  4. Challenge: Create a multi-level page hierarchy for a business site (Home → Services → Web Design, SEO; About → Team, History). Add a custom image size (e.g., 800x400 cropped) via functions.php. Upload an image, verify the new size was generated, and use it on a page.

FAQ

Can I use a page as the front page?
: Yes. Go to Settings → Reading → Your homepage displays and select “A static page.” Choose a page for the front page and optionally another for the posts page.
What is the difference between attached and unattached media?
: Attached media is uploaded via a specific post/page editor and has a “parent” post. Unattached media was uploaded directly to the library or had its parent post deleted.
How do I regenerate image thumbnails after adding a custom size?
: Use WP-CLI: wp media regenerate. Or install the Regenerate Thumbnails plugin. New sizes only apply to images uploaded after the size was registered.
Can I edit an image without losing the original?
: Yes. WordPress always preserves the original. Crops, rotations, and resizes generate new versions. Click “Restore Original Image” to undo all edits.
How do I stop spam comments without Akismet?
: Enable manual approval, require name/email, use “author must have a previously approved comment,” and close comments on old posts after 30 days.

Try It Yourself

  1. Create a page hierarchy: About → Team, About → History, Services → Web Design, Services → SEO
  2. Upload an image to the media library and edit it (crop, resize)
  3. Add a gallery to any page with 4 images
  4. Enable comment threading and require manual approval in Discussion settings
  5. Write and approve a test comment on a post

What’s Next

TopicDescription
Themes & AppearanceCustomizing site design with themes
Plugins, Users & SettingsExtending functionality and managing users
HTMLUnderstanding page markup
CSSStyling your pages and media
PHPAdvanced template customization

What’s Next

Congratulations on completing this Wordpress Pages Media tutorial! Here’s where to go from here:

  • Practice daily — Consistency is more important than long study sessions
  • Build a project — Apply what you learned by building something real
  • Explore related topics — Check out other tutorials in the same category
  • Join the community — Discuss with other learners and share your progress

Remember: every expert was once a beginner. Keep coding!

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro