[Resolved] Custom header

Home Forums Support [Resolved] Custom header

Home Forums Support Custom header

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1135255
    Jacob

    Hello
    I wanted to know if the header could be designed.
    Inside Elementor. But use the GeneratePress main menu.
    And don’t use the menu offered by Elementor

    Many thanks to the assistants

    #1135644
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That’s a tough one.. Are you able to add a shortcode inside your Elementor header? If so, what if you do this:

    add_shortcode( 'primary-navigation', function() {
        ob_start();
    
        generate_navigation_position();
    
        return ob_get_clean();
    } );

    Then you might be able to use [primary-navigation] inside the header.

    #1135728
    Jacob

    Hey Tom
    What I want to do is design the logo and top menu
    In Elementor.
    But Primary Navigation will be GeneratePress.
    Once I create a header template in Elementor.
    It removes the GeneratePress Primary Navigation.
    I want to stay with GeneratePress Primary Navigation

    #1135801
    David
    Staff
    Customer Support

    Hi there,

    save your Elementor Header as a regular template, then add the shortcode it provides to a GP Hook Element:

    https://docs.generatepress.com/article/hooks-element-overview/

    You can add it to the before_header hook. Make sure you Check: Execute Shortcodes and set your Display Rules.

    #1135869
    Jacob

    Hi David
    I have an error..

    error

    Hader

    #1136127
    Jacob

    thanks Tom and David
    I just fix this

    #1136689
    David
    Staff
    Customer Support

    Glad to hear that

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.