Core files such as includes/post-template.php
cannot be directly overridden in a child theme. Instead, you typically need to create your own custom templates or functions in your child theme to achieve similar results.
To modify functionality in files like post-template.php
, consider the following options:
- Custom Template Files: Create a new template file in your child theme and use it where needed, such as for specific pages or post types.
- Hooks and Filters: Use WordPress hooks and filters in your child theme’s
functions.php
to modify or extend functionality without directly altering core files.
Not all theme files can be overridden by placing copies in a child theme. The most common files you can replace are template files (like header.php
, footer.php
, page.php
, etc.) and stylesheets. The WordPress Codex and the official Theme Handbook are great resources, but they don’t provide an exhaustive list of specific files. Generally, focus on overriding templates and using hooks for modifications.