Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

First identify your active theme. In a block theme, edit the category template in Appearance > Editor and arrange header, footer, archive, and sidebar blocks visually. In a classic PHP theme, create or edit category-{slug}.php for one category or category.php for all category archives, then load shared pieces with get_header(), get_sidebar(), and get_footer().

Choose the correct WordPress route

Theme type determines both the editing screen and the files WordPress uses. A block theme builds the header, content area, and footer from blocks and is managed through the Site Editor. A classic theme uses PHP templates and commonly exposes Widgets or the Customizer instead of the block-theme template interface.

Question Block theme Classic theme
Where you edit Appearance > Editor > Templates Theme files, preferably in a child theme
One category category-{slug}.html, then category-{id}.html when supported category-{slug}.php
All category archives category.html category.php
Shared header or footer Template-part blocks get_header() and get_footer()
Sidebar Group, columns, and sidebar-content blocks in the template get_sidebar() or a named sidebar template
Where a visual edit is saved Database, overriding the bundled template Theme source files

Check the active theme and the labels under Appearance before following the steps below. Menu names vary with WordPress version and theme support.

Add the layout with a block theme

1. Open the category template

  1. In the dashboard, open Appearance > Editor.
  2. Select Templates.
  3. Open the category template if one is listed. Some installations also show templates supplied by plugins or templates you previously saved.

For a single category, the template hierarchy prefers category-{slug}.html, followed by category-{id}.html where available. If no specific template exists, WordPress falls back to category.html, then archive.html, and finally index.html.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Build the category structure with blocks

In the Template Editor, place the blocks that should appear on the archive: the archive title, category description, post template or query loop, pagination, and any additional content. To create a sidebar-like area, use a two-column layout or a group containing the blocks you need, such as navigation, a search field, or category-related information.

When the theme provides shared header and footer template parts, insert them with Template Part blocks. The underlying block markup can look like this:

<!-- wp:template-part {"slug":"header"} /-->
<!-- wp:template-part {"slug":"footer"} /-->

The exact slug depends on the template parts supplied by the theme. Use the inserter or the existing template structure rather than assuming a particular name.

3. Save and verify the result

  1. Save the template in the Site Editor.
  2. Open the category archive on the front end.
  3. Check the archive title, description, post list, pagination, header, footer, and sidebar layout.
  4. Review a category with a long name or description and test a narrow screen before publishing.

A template saved through the editor is stored in the WordPress database and takes precedence over the theme’s bundled template. If the same change must travel with a theme to another site, copy the resulting block markup into the corresponding file under the theme’s /templates directory.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Add the layout with a classic PHP theme

1. Decide whether the change is specific or global

Use the category’s slug for a one-category layout. For example, a category with the slug reviews can use category-reviews.php. Use category.php when every category archive should share the same structure.

WordPress continues through broader archive templates when a more specific file is absent, eventually using the theme’s index template. This fallback is why a category can display correctly even when no category file exists.

2. Work in a child theme

Create or edit the template in a child theme when possible. This keeps your changes separate from the parent theme and reduces the risk of losing them during a parent-theme update. Confirm that the child theme is active and that its directory contains the template file with the exact filename WordPress expects.

3. Load shared header, sidebar, and footer files

Place the normal theme elements around the category layout with the standard template tags:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<?php get_header(); ?>

<main class="category-archive">
    <!-- category heading and the theme's archive loop go here -->
</main>

<?php get_sidebar(); ?>
<?php get_footer(); ?>

get_header() loads the theme header, and get_footer() loads the footer. get_sidebar() loads the default sidebar. To load a named alternative, use a call such as get_sidebar( 'your_custom_template' ); WordPress then looks for sidebar-your_custom_template.php.

4. Preserve the archive loop

Keep the theme’s expected archive loop and place your custom wrappers, headings, or columns around it. Removing or altering the loop carelessly can break post output, pagination, or theme-specific hooks. Match the classes and markup conventions already used by the theme when you want its styling to continue working.

5. Test before publishing

  • Open the targeted category and at least one other category.
  • Test pagination and an archive with few posts.
  • Check long category titles and descriptions.
  • Check the layout on a narrow screen.
  • Verify that the header, footer, and sidebar still appear on other templates as intended.

Target one category or every category?

Use a category-specific template when

  • One category needs a different header, footer, sidebar, or content arrangement.
  • You are creating a landing page for a special topic.
  • The category requires unique introductory content or supporting blocks.

Use the shared category template when

  • All category archives should have the same layout.
  • You want one change to apply consistently across categories.
  • You are maintaining a theme whose archive design is centralized.

For block themes, this means choosing between a category-specific HTML template and category.html. For classic themes, it means choosing between category-{slug}.php and category.php.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common problems and fixes

The Editor menu is missing

The active theme may be classic rather than block-based, or the installed WordPress and theme combination may not expose the same Site Editor controls. Use the PHP-template route for a classic theme instead of looking for a block-theme template screen.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Teacher Record Book
  • Keep track of everything from attendance to test scores
  • Spiral bound
  • Measures 8-1/2" x 11"

My category-specific design is not showing

Check the category slug and filename character for character. Also check whether a template saved in the Site Editor is overriding the file bundled in the theme. Clear any site or browser cache only after confirming that the correct template is selected.

The sidebar appears twice or disappears

Inspect both the category template and the loaded header, footer, or sidebar files. A classic theme may already call get_sidebar() inside its standard archive structure; adding another call can duplicate it. In a block theme, remove duplicate sidebar or column groups from the template.

Changes vanished after a theme update

Edits made directly to a parent theme can be replaced by an update. Move PHP changes to a child theme. For block-theme changes that must be distributed as theme code, copy the saved block markup into the theme’s matching /templates file and keep that file under version control.

Quick Recap

SaleBestseller No. 4
Bestseller No. 5
Teacher Record Book
Teacher Record Book
Keep track of everything from attendance to test scores; Spiral bound; Measures 8-1/2" x 11"
$4.89

Practical decision checklist

  • Theme: Is the active theme block-based or classic?
  • Scope: Is the change for one category or all category archives?
  • Header/footer: Should you reuse shared parts or create category-only markup?
  • Sidebar: Will it be a block-based column/group or a PHP sidebar include?
  • Maintenance: Should the change live in the database for visual editing or in versioned theme files for deployment?
  • Quality check: Have you tested pagination, long text, other categories, and narrow screens?

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.