Celebrating 7 Years! Get up to $30 off GeneratePress Premium!

[Support request] Php not overriding

Home Forums Support [Support request] Php not overriding

Home Forums Support Php not overriding

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #533484
    Erin

    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!

    GeneratePress 2.0.2
    #534074
    Erin

    Please advise

    #534076
    Tom
    Lead Developer
    Lead Developer

    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
    }
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.