I want to change a php file in a subdir of my theme folder. The path to that specific file is:
/includes/sf-content-display/sf-post-formats.php
I copied the file within the subdirs in my child theme and made the changes.
It seems, if I read some articles, that I have to hook a selfmade function in a file functions.php in the child theme.
I did the folowing:
function require_once_child() {
require_once('includes/sf-content-display/sf-post-formats.php');
}
function require_once_child() {
remove_action( 'init', 'require_once' );
add_action( 'init', 'require_once_child' );
}
add_action( 'init', 'require_once_child' );
Result is an error:
Fatal error: Cannot redeclare require_once_child() (previously declared in /www/htdocs/keltenwo/wp/wp-content/themes/flexform-child/functions.php:3) in /www/htdocs/keltenwo/wp/wp-content/themes/flexform-child/functions.php on line 9
Any suggestions?
style.css
? Please clarify this question.