What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The correct method depends on your active theme. In a block theme, edit the category template in Appearance > Editor and arrange template-part, group, column, and archive blocks. In a classic theme, create or edit a category PHP template—usually category-{slug}.php for one category or category.php for all categories—and load shared files with get_header(), get_sidebar(), and get_footer().
First identify your theme type
Open the WordPress dashboard and inspect the Appearance menu. A block theme uses the Site Editor to manage headers, footers, templates, and blocks. A classic theme generally uses PHP template files and may provide Widgets and the Customizer instead. The menus and template names can vary by WordPress version and theme.
- Appearance > Editor with templates and template parts indicates a block-theme workflow.
- Theme files such as
header.php,sidebar.php,footer.php, and category PHP templates indicate a classic-theme workflow.
How category template selection works
WordPress uses a template hierarchy, choosing the most specific available category template before falling back to broader archive templates.
Block-theme hierarchy
category-{slug}.htmlfor one category, such ascategory-news.html.category-{id}.htmlfor one category by numeric ID.category.htmlfor category archives generally.archive.html, thenindex.html, as broader fallbacks.
Classic-theme hierarchy
category-{slug}.phpfor one category.category-{id}.phpfor one category by ID.category.phpfor all category archives.- Broader archive templates and finally
index.phpif no category-specific file exists.
Use the slug-specific file when only one category needs a different layout. Use the general category template when every category should share the change.
#1 Best Overall
- Used Book in Good Condition
Customize a category in a block theme
Open the category template
- Go to Appearance > Editor.
- Open Templates.
- Select the category template if it is listed. Depending on the theme, it may be called Category, Categories, or be represented by a more general archive template.
- To target one category, create or select a category-specific template when your theme and WordPress version expose that option.
Add or change the header
Use the template’s existing header template part when possible. A template-part block inserts a shared header maintained separately from the category layout:
<!-- wp:template-part {"slug":"header"} /-->
You can also place a Group, Site Logo, Navigation, Search, or other blocks directly in the template when the category needs a distinct arrangement. Editing a shared header template part changes it wherever that part is used, so edit the category template itself if the variation should be limited to category archives.
Rank #2
Add or change the footer
Insert the theme’s footer template part at the end of the template, or create a footer arrangement from blocks:
<!-- wp:template-part {"slug":"footer"} /-->
Typical footer content includes navigation, copyright text, contact details, and social links. A shared footer part affects all templates that use it; a category-only footer belongs inside the category template.
Recommended Free Tools
Build a sidebar area
Block themes do not require a separate sidebar.php file. Create a two-column layout with a Columns block, or use a Group block beside the archive content. Place the blocks needed for the category audience—such as Categories, Search, Latest Posts, navigation, or custom text—in the secondary column. Keep the main post-list column and sidebar in a logical reading order on narrow screens.
Arrange the archive content
Use the Query Loop or Post Template blocks for posts, along with Archive Title and Term Description blocks where available. You can move the title, description, post list, and sidebar to control their visual order without changing the category’s posts.
Rank #4
Save, preview, and understand where the change lives
Save the template, then open the category archive on the front end in a logged-out window or private browser tab. Changes saved through the Site Editor are stored in the site’s database and take precedence over the theme’s bundled template files. If the layout must travel with a distributed theme, copy the resulting block markup into the corresponding file in the theme’s /templates directory rather than relying only on the database-saved version.
Customize a category in a classic theme
Choose the right PHP file
Find the category’s slug or ID in the dashboard’s category editor. In a child theme, create category-{slug}.php for one category, or category.php for all category archives. A child theme keeps the override separate from the parent theme, so a parent-theme update is less likely to erase it.
Best Value
- Keep track of everything from attendance to test scores
- Spiral bound
- Measures 8-1/2" x 11"
Load the shared header, sidebar, and footer
A basic category template can call the site’s existing shared files and retain the theme’s normal loop:
<?php
get_header();
?>
<main class="category-archive">
<header class="archive-header">
<?php the_archive_title( '<h1>', '</h1>' ); ?>
<?php the_archive_description( '<div class="archive-description">', '</div>' ); ?>
</header>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<article>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>
</article>
<?php endwhile; ?>
<?php the_posts_pagination(); ?>
<?php else : ?>
<p>No posts found.</p>
<?php endif; ?>
</main>
<?php
get_sidebar();
get_footer();
?>
Use get_sidebar() for the default sidebar. A named sidebar loads a matching file, for example:
<?php get_sidebar( 'category' ); ?>
That call looks for sidebar-category.php. Place the call where the sidebar belongs in the theme’s layout, and use the theme’s existing wrapper classes or CSS conventions so the new area aligns correctly.
Keep the theme’s expected loop and pagination
Do not remove the query loop merely to add surrounding markup. Preserve the theme’s loop, pagination, escaping, and accessibility conventions where possible. Put custom headings, promotional panels, or category-only markup before or after the loop, then test categories with no posts as well as categories with many posts.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsQuick Recap
Which approach should you choose?
| Decision | Block theme | Classic theme |
|---|---|---|
| Primary editing location | Appearance > Editor, Templates, and blocks | Child-theme PHP templates and template tags |
| One-category layout | category-{slug}.html when supported |
category-{slug}.php |
| All category layouts | category.html |
category.php |
| Shared header or footer | Template-part block | get_header() and get_footer() |
| Sidebar | Group or Columns block in the template | get_sidebar() or a named sidebar file |
| Where edits are stored | Database when saved in the Site Editor; copy markup to /templates for a portable theme change |
Versioned theme files, preferably in a child theme |
| Best fit | Visual editing and block-based layouts | Developer-managed source and precise PHP control |
Test before publishing
- Open the exact category URL and confirm the intended header, footer, and sidebar appear.
- Check another category to ensure a one-category override did not change every archive.
- Test pagination, an empty category, long category names, and long descriptions.
- Check the layout at narrow and wide viewport sizes; make sure the sidebar collapses or moves in a usable order.
- Verify keyboard navigation, heading order, link labels, contrast, and that the post list remains readable without the sidebar.
- If a template edit appears ineffective, check whether a more specific template, a saved Site Editor template, or a caching layer is taking precedence.
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.




