Skip to content

Instantly share code, notes, and snippets.

@eufelipe
Created October 7, 2017 19:39
Show Gist options
  • Save eufelipe/e07a5377996a55911ffaef7c8b36ba27 to your computer and use it in GitHub Desktop.
Save eufelipe/e07a5377996a55911ffaef7c8b36ba27 to your computer and use it in GitHub Desktop.
// title
<?php wp_title(''); ?><?php if (wp_title('', false)) { echo ' : '; } ?><?php bloginfo('name'); ?>
// Url Dir
<link href="<?php echo get_template_directory_uri(); ?>/fonts/css/fontello.css" rel="stylesheet">
// Menu by Name
<?php wp_nav_menu(array('menu' => 'sidebar-menu', 'menu_class' => '')); ?>
//
<?php
$locations = get_nav_menu_locations();
$menu = wp_get_nav_menu_object($locations['sidebar-service']);
$menuitems = wp_get_nav_menu_items($menu->term_id);
?>
<?php if (!empty($menuitems)) { ?>
<?php wp_nav_menu(array('theme_location' => 'sidebar-service', 'menu_class' => '')); ?>
<?php } ?>
<p class="title"> <?php wp_nav_menu_contato(); ?></p>
// functions
function menu_header()
{
wp_nav_menu(
array(
'theme_location' => 'header-menu',
'menu' => '',
'container' => 'div',
'container_class' => 'menu-{menu slug}-container',
'container_id' => '',
'menu_class' => 'menu',
'menu_id' => '',
'echo' => true,
'fallback_cb' => 'wp_page_menu',
'before' => '',
'after' => '',
'link_before' => '',
'link_after' => '',
'items_wrap' => '<ul class="nav navbar-nav navbar-nav-primary">%3$s</ul>',
'depth' => 0,
'walker' => ''
)
);
}
function wp_nav_menu_contato()
{
wp_nav_menu(get_nav_options_no_ul('footer-menu-contato'));
}
// Templates
<?php /* Template Name: Full Page com Header */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment