Reply To: Top Menu with Search Bar

Home Forums Support Top Menu with Search Bar Reply To: Top Menu with Search Bar

#229416
Tom
Lead Developer
Lead Developer

Hi Jose,

Thanks for your purchase!

Give this a shot:

add_action( 'generate_inside_secondary_navigation','generate_search_secondary_navigation' );
function generate_search_secondary_navigation()
{
    ?>
    <span class="secondary-nav-search">
        <?php get_search_form(); ?>
    </span>
    <?php
}

Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

.secondary-nav-search {
    float: right;
}

.secondary-nav-search input.search-submit {
    display: none;
}

.secondary-nav-search input.search-field {
    padding: 7px 15px 8px;
}

Adding CSS: https://generatepress.com/knowledgebase/adding-css/

Hope this helps 🙂