Site logo

Archived topic

Php not overriding

2 replies · Started by Erin on March 28, 2018

Viewing posts 1–3 of 3

We're trying to build a custom header template with bootstrap, but we can't override the header.php in the child theme. We are using the same structure as on parent themes\generatepress-child\inc\structure\header.php

Changes made on \inc\structure\header.php on child theme are not visible on website.

Thanks!

Please advise

Overriding template files only works in the top level I believe.

You should do this:

remove_action( 'generate_header', 'generate_construct_header' );
add_action( 'generate_header', 'tu_my_custom_header' );
function tu_my_custom_header() {
?>
    My custom header in here
<?php
}
This archived topic is closed to new replies.