can the footer be included on a child theme

Take the whole footer.php from the parent theme and copy it to your child theme. Your child theme will override the parent footer now. Any changes you make to that footer file in the child theme (ie removing branding) will affect the site. This is usually better than starting with a whole new footer.php especially … Read more

How to override parent theme template files?

Core WordPress templates (listed here) can be overwritten by placing them in the child theme (because WordPress itself loads them it knows to do it in a child theme friendly way). Any other template files your theme might be using can only be overwritten if they’re included using the correct template functions, like get_template_part(), which … Read more

Child theme stylesheet not always overriding “index”

wp_enqueue_style( $parent_style, get_stylesheet_directory_uri() . ‘/style.css’ ); wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array( $parent_style ), wp_get_theme()->get(‘Version’) ); Look closer, specifically at the URLs you passed to enqueue style: parent: get_stylesheet_directory_uri() . ‘/style.css’ child: get_stylesheet_directory_uri() . ‘/style.css’ They’re identical, they’re the same file, that’s the problem. Your child themes stylesheet isn’t overriding the parent, because the parent … Read more

Copyright info change – Corporate Plus Theme PHP [closed]

Both functions check if the function corporate_plus_footer() exists. If not, one is defined. Without going deeper into hooks and filters, you can simply declare your own corporate_plus_footer() and the other won’t get loaded. Add this to your functions.php function corporate_plus_footer() { echo ‘it works’; } No additional add_action() or similar. Just this function in your … Read more

Overrite parent functions using child functions

You can’t just redeclare the function in the child theme or call add_action a second time. It doesn’t replace it, it adds a second hook. As a result, you haven’t overriden it, you’ve duplicated the original. Child theme overrides only work for templates. What’s more, by adding a second definition of wp_bootstrap_starter_custom_header_setup you’ve declared the … Read more

filemtime(): stat failed warning within a child theme

The problem is in your parent theme. The parent theme is using get_stylesheet_directory() here: filemtime(get_stylesheet_directory() . ‘/dist/css/custom-style.css’), When the parent theme is active, that’s fine, because get_stylesheet_directory() will point that file in the parent theme. The problem is that when you activate a child theme, it is trying to get the filemtime() of ‘/dist/css/custom-style.css’ in … Read more