Theme child
Hello,
I use the theme child. I'd like to modify includes/content-post.php
If i use the same structure in my child theme, includes/content-post.php is not modified because of "
require_once( THEME_DIR .'/includes/content-post.php' );
in functions.php.
if i write
require_once( trailingslashit( get_stylesheet_directory() ) . '/includes/content-post.php' );
in betheme-child/functions.php, it works but i have sometimes strange behaviours.
Do you know what is the best method to use a child version of content-post.php ?
Thank you for your help.
Regards
Comments
this does not work because we did not wrapped function into function_exists function. So please go to includes/content-post.php file and wrap function mfn_content_post() into function_exists, just like below: also in child theme functions.php file, please use function as below: