/
menu-primary.php
38 lines (26 loc) · 1.16 KB
/
menu-primary.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* Primary Menu Template
*
* Displays the Primary Menu if it has active menu items.
*
* @package MyLife
* @subpackage Template
* @since 0.1.0
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2011 - 2013, Justin Tadlock
* @link http://themehybrid.com/themes/my-life
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
if ( has_nav_menu( 'primary' ) ) : ?>
<?php do_atomic( 'before_menu_primary' ); // my-life_before_menu_primary ?>
<div id="menu-primary" class="menu-container">
<div class="wrap">
<?php do_atomic( 'open_menu_primary' ); // my-life_open_menu_primary ?>
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'container_class' => 'menu', 'menu_class' => '', 'menu_id' => 'menu-primary-items', 'fallback_cb' => '' ) ); ?>
<?php do_atomic( 'close_menu_primary' ); // my-life_close_menu_primary ?>
<?php if ( !is_admin_bar_showing() ) get_search_form(); // Loads the searchform.php template. ?>
</div>
</div><!-- #menu-primary .menu-container -->
<?php do_atomic( 'after_menu_primary' ); // my-life_after_menu_primary ?>
<?php endif; ?>