Leo
(@leohsiang)
Hi there,
WordPress only allows files to be overwritten in the top-level folder.
What are you trying to achieve? There is a generally a filter we can use.
Ok. No problem, thank you.
What if there is no action/filter? I want to change how post meta displays so overriding post-meta.php file which is inside inc/structure/ folder. But it doesn’t work, I am not sure if WP allows only top level files to be overridden so please provide if any alternate step exists.
Hi there,
you would write a replacement Function and add it your child themes functions.php
For example:
the post-meta.php first function call is the generate_content_nav.
Thanks to this condition if ( ! function_exists( 'generate_content_nav' ) ) { it will not run if a replacement generate_content_nav exists in the child theme.
-
This reply was modified 5 years, 10 months ago by
David.