Skip to content

Commit

Permalink
Added: [UI Frontend] Header Navigation: Search
Browse files Browse the repository at this point in the history
  • Loading branch information
apzeero committed May 21, 2019
1 parent 2f5216e commit ec89d0a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
22 changes: 17 additions & 5 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,29 @@
}
?>
</a>
</div>
</div>

<?php
wp_nav_menu( array(
wp_nav_menu(array(
'theme_location' => 'primary-menu',
'container_class' => 'uk-navbar-right',
'container_class' => '',
'menu_class' => 'uk-navbar-nav',
'items_wrap' => '<ul class="%2$s">%3$s</ul>',
'walker' => new UIKit3_Walker_Nav_Menu(),
) );
));
?>
</div>
</div>
<div class="uk-navbar-right">

<div>
<a class="uk-navbar-toggle" uk-search-icon href="#"></a>
<div class="uk-drop uk-background-default uk-padding-small uk-padding-remove-vertical" uk-drop="mode: click; pos: left-center; offset: 0">
<?php get_search_form(); ?>
</div>
</div>

</div>

</nav>
</div>
</header>
Expand Down
12 changes: 12 additions & 0 deletions searchform.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
* The template for displaying search form
*
* @link https://developer.wordpress.org/reference/functions/get_search_form/
*
* @package ThemeWPUGPH
*/
?>
<form class="uk-search uk-search-navbar uk-width-1-1" method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<input class="uk-search-input" name="s" id="s" type="search" placeholder="<?php _e( 'Search...', 'themewpugph' ); ?>" autofocus>
</form>

0 comments on commit ec89d0a

Please sign in to comment.