本文整理汇总了PHP中porto_main_menu函数的典型用法代码示例。如果您正苦于以下问题:PHP porto_main_menu函数的具体用法?PHP porto_main_menu怎么用?PHP porto_main_menu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了porto_main_menu函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: porto_main_menu
}
?>
</div>
</div>
</div>
<?php
}
?>
<div class="header-main">
<div class="container">
<div class="header-left">
<div id="main-menu">
<?php
// show main menu
echo porto_main_menu();
?>
</div>
</div>
<div class="header-center">
<?php
// show logo
?>
<h1 class="logo">
<a href="<?php
echo esc_url(home_url('/'));
?>
" title="<?php
echo esc_attr(get_bloginfo('name', 'display'));
?>
- <?php
示例2: porto_main_toggle_menu
function porto_main_toggle_menu()
{
global $porto_settings, $porto_layout;
$header_type = porto_get_header_type();
if ($header_type != 9) {
return porto_main_menu();
}
ob_start();
$main_menu = porto_get_meta_value('main_menu');
if (has_nav_menu('main_menu') || $main_menu) {
$args = array('container' => '', 'menu_class' => 'main-menu sidebar-menu' . ($porto_settings['menu-sub-effect'] ? ' ' . $porto_settings['menu-sub-effect'] : ''), 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'fallback_cb' => false, 'walker' => new porto_sidebar_navwalker());
if ($main_menu) {
$args['menu'] = $main_menu;
} else {
$args['theme_location'] = 'main_menu';
}
wp_nav_menu($args);
}
$output = str_replace(' ', '', ob_get_clean());
return apply_filters('porto_main_toggle_menu', $output);
}
示例3: force_balance_tags
// show contact info and mini cart
$contact_info = $porto_settings['header-contact-info'];
if ($contact_info) {
echo '<div class="header-contact">' . force_balance_tags($contact_info) . '</div>';
}
$minicart = porto_minicart();
echo $minicart;
?>
</div>
</div>
</div>
</div>
<?php
// show main menu
$main_menu = porto_main_menu();
if ($main_menu) {
?>
<div class="main-menu-wrap">
<div id="main-menu" class="container <?php
echo $porto_settings['menu-align'];
?>
">
<?php
echo $main_menu;
?>
</div>
</div>
<?php
}
?>
示例4: porto_main_toggle_menu
function porto_main_toggle_menu()
{
global $porto_settings, $porto_layout;
$header_type = $porto_settings['header-type'];
if ($header_type != 9) {
return porto_main_menu();
}
ob_start();
if (has_nav_menu('main_menu')) {
wp_nav_menu(array('theme_location' => 'main_menu', 'container' => '', 'menu_class' => 'main-menu sidebar-menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'fallback_cb' => false, 'walker' => new porto_sidebar_navwalker()));
}
return str_replace(' ', '', ob_get_clean());
}