[Resolved] Styling on my hook on (`after_header)

Home Forums Support [Resolved] Styling on my hook on (`after_header)

Home Forums Support Styling on my hook on (`after_header)

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1269597
    Huseyin

    Hi GeneratePress Team

    Want to achieve something like this for the hook: https://ibb.co/fHsbZ2W

    LIVE Url with the hook I’m after https://mixkit.co/free-stock-art/discover/business/

    Example of one page with the hook located after_header = https://wordpress-394091-1251842.cloudwaysapps.com/category/exam-advice/

    #1269611
    Leo
    Staff
    Customer Support

    Hi there,

    What issues are you having?

    There isn’t anything built-in GP specifically for that so you would need to custom code it.

    Another option is to use the secondary navigation:
    https://docs.generatepress.com/article/secondary-navigation-layout-overview/

    Then we can move it below the page hero with this PHP snippet:

    add_action( 'after_setup_theme','craig_move_navigation' );
    function craig_move_navigation() {
        remove_action( 'generate_after_header', 'generate_add_secondary_navigation_after_header', 5 );
        add_action( 'generate_after_header', 'generate_add_secondary_navigation_after_header', 15 );
    }
    #1269747
    Huseyin

    PERFECT THANKS

    #1269749
    Leo
    Staff
    Customer Support

    No problem 🙂

    #1344819
    Leo
    Staff
    Customer Support

    Can you try this instead:

    add_action( 'wp','craig_move_navigation' );
    function craig_move_navigation() {
        remove_action( 'generate_after_header', 'generate_add_secondary_navigation_after_header', 5 );
        add_action( 'generate_after_header', 'generate_add_secondary_navigation_after_header', 15 );
    }
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.