Skip to content

Instantly share code, notes, and snippets.

@blickwert
Last active January 2, 2016 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blickwert/8322225 to your computer and use it in GitHub Desktop.
Save blickwert/8322225 to your computer and use it in GitHub Desktop.
<?php
/////////////////////////////////////
// Primary Wordpress navigation
////////////////////////////////////
?>
<ul>
<?php
// wp_nav_menu
if ($GLOBALS['customize_wp']['primary_navtype'] == 'wp_nav_menu') {
$args = array(
'depth' => 1,
'menu' => 'Hauptnavigation',
'items_wrap'=> '%3$s',
'container' => ''
);
wp_nav_menu( $args );
// wp_list_pages
} elseif ($GLOBALS['customize_wp']['primary_navtype'] == 'wp_list_pages') {
$args = array(
'depth' => 1,
'title_li' => __(''),
// 'sort_column' => 'menu_order, post_title',
'link_before' => '',
'link_after' => '',
'menu_class' => '', );
wp_list_pages( $args );
// wp_list_categories
} elseif ($GLOBALS['customize_wp']['navtype'] == 'wp_list_categories') {
$args = array(
'depth' => 1,
'hide_empty' => 1,
'title_li' => __(''),
// 'sort_column' => 'menu_order, post_title',
'menu_class' => '', );
wp_list_categories( $args );
}
// Start Search
?>
</ul>
<?php if(get_field('nav_main_search_options', 'options' ) == "true") { ?>
<form class="ym-searchform" action="<?php echo home_url( '/' ); ?>">
<input class="ym-searchfield" type="search" placeholder="Suche …" value="<?php the_search_query(); ?>" name="s" id="s" />
<input class="ym-searchbutton" type="submit" value="Search" />
</form>
<?php } ?>
</nav>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment