• Resolved lizardmorrow

    (@lizardmorrow)


    I’ve just started work on a client’s website that uses the Honeypress Pro theme. I’ve created a child theme, and everything works except for the Sticky Header. The header changes opacity and shrinks on scroll, but it won’t stick to the top of the page when enabled.

    Right now, the child function has a functions.php file containing this:

    <?php
    add_action( 'wp_enqueue_scripts', 'child_theme_enqueue_styles');
    
    function child_theme_enqueue_styles() {
        $parenthandle = 'parent-style';
        $theme = wp_get_theme();
    
        wp_enqueue_style( $parenthandle, get_template_directory_uri() . '/style.css',
        array(),
        $theme->parent()->get('Version')
    );
        wp_enqueue_style( 'child-style', get_stylesheet_uri(),
        array( $parenthandle ),
        $theme->get('Version')
    );
    }
    ?>

    And a style.css file containing this:

    /*
     Theme Name:   Honeypress Pro Child Theme
     Description:  A Honeypress Pro child theme 
     Author:       Lizard Morrow on behalf of Scottish Tech Army
     Author URI:   https://www.scottishtecharmy.org/
     Template:     honeypress-pro
     Version:      1.0.0
     License: GNU General Public License v2 or later
     License URI: https://www.gnu.org/licenses/gpl-2.0.html
    */
    

    Could you please help me work out why the header isn’t sticking anymore? Thank you!

    Note: The linked page is using the Honeypress Pro theme, so you will see the header work as expected there. I can switch it to the child theme upon request if you need to see what it looks like broken.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Sticky Header breaks in Child Theme’ is closed to new replies.