[Resolved] how to place menu items to the right of the search bar?

Home Forums Support [Resolved] how to place menu items to the right of the search bar?

Home Forums Support how to place menu items to the right of the search bar?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2518453
    WPguy

    Hi,

    Could you please let me know how can I place menu items to the right of the search bar?

    The screenshot and details are attached.

    Thanks

    #2518947
    Ying
    Staff
    Customer Support

    Hi there,

    For the account, you can use the same hook as the search, generate_after_header_content.

    For the cart icon, try adding this PHP snippet to move it to generate_after_header_content hook as well:

    add_action('generate_after_header_content','generate_wc_do_cart_menu_item',10);
    remove_action( 'wp', 'generatepress_wc_add_menu_bar_items',10 );

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    #2519520
    WPguy

    Thanks, Ying,

    Cart icon: I added the PHP snippet and it worked. But the cart icon appears before the search bar. How to place it after the search bar?

    The account: What shall be the div class for me to create the hook?

    Thank you!

    #2519550
    Fernando
    Customer Support

    Hello there,

    Try adding this through Appearance > Customize > Additional CSS:

    header span.menu-bar-item.wc-menu-item {
     order: 1;
    }
    #2519571
    WPguy

    Thanks, Fernando!

    #2519574
    Fernando
    Customer Support

    You’re welcome!

    #2519748
    WPguy

    Sorry I have to re-open the topic as I still need to get the answer to the question above:

    The account: What shall be the div class for me to create the hook?

    Thanks

    #2520408
    Ying
    Staff
    Customer Support

    The account: What shall be the div class for me to create the hook?

    Not sure I understand your question, the Account is currently in a hook element, you just need to change the hook from generate_menu_bar_itemto generate_after_header_content.

    #2520437
    WPguy

    Thanks, Ying!

    #2520517
    Ying
    Staff
    Customer Support

    No Problem, glad to help 🙂

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