I have created child theme of twentyseventeen and first of all i created css file for child theme and inherited parent theme css like

function enqueue_parent_styles()

   wp_enqueue_style('parent-style', get_template_directory_uri().'/style.css');

add_action('wp_enqueue_scripts', 'enqueue_parent_styles');

in functions.php file in child theme and i have copied all the content from parent theme to child theme except functions.php file. My question is that when I change some content in a function of the template-tags.php file in child theme, it does not change the output.

  • Nathan Powel Sir, my question is not related to spalling mistake , everybody can understand what i am asking.. Mar 7, 2017 at 7:35

1 Answer 1


Just happened to be dealing with a situation somewhat similar to this one (I think).

In short, if - and only if! - the parent theme is well-written, with functions enclosed by if ( ! function_exists('function_name') ) conditionals, then all you will need to do is place your replacement function in your child functions.php. In other words, there will be no need to re-produce the file structure of the parent theme. If you do need to include additional files other than template files, with or without the parent theme file structure, you'll have to include or require them.

If, however, the function you wish to replace has not been conditionally enclosed, then you may have to look into removing it or its output via action or action hook. In some cases that might be sufficient. In others it might be difficult to figure out.

Can't get more specific without seeing the rest of the code you're dealing with!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.