Site logo

[Support request] Custom Search Bar

Home Forums Support [Support request] Custom Search Bar

Home Forums Support Custom Search Bar

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2554417
    Abdul Khaliq

    Is there any way to generate a custom search bar with the search icon only in the header? After clicking the search icon, search bar appears below header. Just like this website: https://allaboutpins.com/

    #2554572
    Ying
    Staff
    Customer Support

    Hi there,

    1. Add this PHP code so we can move out the search bar from the navigation area to the after header area:

    add_action('wp', function() {
    	remove_action( 'generate_inside_navigation', 'generate_navigation_search',10 );
    add_action( 'generate_after_header', 'generate_navigation_search' );
    });

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

    2. Add this CSS code, feel free to remove or change the background-color from the code:

    .navigation-search.nav-search-active {
        position: relative;
        background-color: red;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    #2554787
    Abdul Khaliq

    Is it possible to build up the complete header in GeneratePress same as the mentioned site?

    #2555610
    Ying
    Staff
    Customer Support

    Yes, it’s possible.

    #2556024
    Abdul Khaliq

    How, can you please tell me about the procedure or any plugin to do this?

    #2556642
    Ying
    Staff
    Customer Support

    You can build the orange top bar using either topbar widgets at appearance > widgets, or a block element – hook, choose before_header as hook name.

    Here’s a demo video for the method using block element – hook: https://youtube.com/watch?v=1VQECQxeyQE&si=EnSIkaIECMiOmarE

    Go to customizer > layout > primary navigation, set the navigation location to float right.

    You can add the Get free design button using a block element – hook, choose menu_bar_item as the hook name.

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