Override templates

Every template file Stoat ships, what each one draws, and how to replace one from a child theme.

Copy a file from the parent into your child theme at the same path, edit it, and WordPress loads yours instead.

The templates

Stoat is a small theme. This is all of it:

File Draws
index.php every listing — blog home, category, tag, author, date, CPT archive, search, 404
singular.php every single post and page
header.php <head>, the header bar, the opening of <main>
footer.php widgets, copyright, footer menu, </body>
comments.php the comment thread and form
template-parts/branding.php logo, site title, tagline
template-parts/archive-header.php the title and description above a listing
template-parts/content.php one row in a listing
template-parts/content-hero-half.php the featured first post hero

There is no single.php, page.php, archive.php, category.php or search.php. WordPress’s template hierarchy falls through to singular.php and index.php, and Stoat lets it — one listing template means a category archive cannot silently drift away from the blog home.

You can still add them. Dropping a category.php into your child theme makes WordPress use it for category archives, exactly as the hierarchy says. That is the cleanest way to make one context different.

A template part

Template parts are loaded with get_template_part(), which checks the child theme first. So to change how a listing row looks:

stoat-child/template-parts/content.php

Copy the parent’s version as a starting point and edit from there.

The inc/ files are not templates

inc/template-tags.php, inc/customizer.php and the rest are required by functions.php with an absolute parent path. Copying one into a child theme does nothing. To change a function in there, either:

  • use the hook or filter if one exists, or
  • redeclare the function in the child’s functions.php — every function in those files is wrapped in if ( ! function_exists() ), and the child’s functions.php loads before the parent’s, so yours wins.

The second is a real, supported escape hatch, and it is why the wrappers are there. It is also a commitment: a redeclared function does not get the parent’s bug fixes.

Adding to a template without copying it

Before copying header.php to add a link, check whether do_action( 'stoat_header_buttons', $context ) will do it — that hook exists precisely so the header does not have to be forked. Same for stoat_entry_flag on a listing row. See hooks and filters.

A copied template is a file you now maintain forever. A hook is not.

Last updated September 13, 2026

Something missing or out of date? Ask us and we will fix the page.