Search form outside of menu items

Viewing 1 post (of 1 total)
  • Author
  • #5173

    Turn off the default menu search form on the options page then add the code below on a child-theme’s functions.php

    function ra_search_on_nav() {
       <form id="nav-search-form" class="right" action="<?php echo home_url( '/' ); ?>" method="get" role="search">
          <label><input type="search" name="s"></label>
          <input type="submit" value="">
    add_action( 'ast_hook_after_nav', 'ra_search_on_nav' );
Viewing 1 post (of 1 total)
  • The forum ‘Asteroid’ is closed to new topics and replies.