I 'm trying to make some changes on single- portfolio.php. I copied the file in my child theme folder and make some changes, but it doesn't work . This is the single-portfolio file of the parent theme is included . Is there something to declare in the functions.php of the child theme to load the correct file ?
Thank you Tahir.
I tried to follow these tips, but it goes wrong.
In my child theme: functions.php i add this:
if ( ! function_exists( 'salient_files' ) ) {
function salient_files() {
// include required files
include(get_stylesheet_directory()."/single-portfolio.php");
}
}
add_action( 'after_setup_theme', 'salient_files' );
It doesn't work. The single-portfolio.php of the parent theme is included on every page. I must not have understood or I have forgotten something. Perhaps i have to call the function of the parent theme who loads the single-portfolio file instead of 'salient_files' who refers to nothing. But i can't find it.
Sorry. It works without added something in functions.php. I made a mistake by editing the single-portfolio.php file in my child theme. I fixed it and it works now. Sorry I should have checked what I did before to ask this question.
Hi,
I 'm trying to make some changes on single- portfolio.php. I copied the file in my child theme folder and make some changes, but it doesn't work . This is the single-portfolio file of the parent theme is included . Is there something to declare in the functions.php of the child theme to load the correct file ?
Hey Pedro!
See url : http://www.organizedthemes.com/advanced-child-theme-usage/ . You will likely have to include the child theme single-portfolio manually.
Thanks
ThemeNectar Support Team
Thank you Tahir.
I tried to follow these tips, but it goes wrong.
In my child theme: functions.php i add this:
It doesn't work.
The single-portfolio.php of the parent theme is included on every page.
I must not have understood or I have forgotten something.
Perhaps i have to call the function of the parent theme who loads the single-portfolio file instead of 'salient_files' who refers to nothing.
But i can't find it.
Sorry.
It works without added something in functions.php.
I made a mistake by editing the single-portfolio.php file in my child theme.
I fixed it and it works now.
Sorry I should have checked what I did before to ask this question.