Commit 98d33317 by rajshah

footer menu dynamic

parent 52f68e49
......@@ -84,24 +84,36 @@
<footer class="background-dark section-footer">
<div class="container">
<div class="footer-links">
<div class="footer-link-wrapper">
<strong class="text-uppercase text-white">Quick Links</strong>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<div class="footer-link-wrapper">
<strong class="text-uppercase text-white">Services</strong>
<ul>
<li><a href="#">Wordpress Development</a></li>
<li><a href="#">Search Engine Optimization (SEO)</a></li>
<li><a href="#">Promotional Video</a></li>
<li><a href="#">UI/UX Design</a></li>
</ul>
</div>
<?php
function footer_menu_makura($theme_location, $default_title)
{
$locations = get_nav_menu_locations();
if (!isset($locations[$theme_location])) {
return;
}
$menu = wp_get_nav_menu_object($locations[$theme_location]);
if (!$menu || empty($menu->name)) {
return;
}
$menu_title = esc_html($menu->name ?: $default_title);
?>
<div class="footer-link-wrapper">
<strong class="text-uppercase text-white"><?php echo $menu_title; ?></strong>
<ul>
<?php
wp_nav_menu([
'theme_location' => $theme_location,
'container' => false,
'menu_class' => '',
]);
?>
</ul>
</div>
<?php
}
footer_menu_makura('quick-link', 'Quick Links');
footer_menu_makura('services', 'Services');
?>
<div class="footer-link-wrapper">
<strong class="text-uppercase text-white">Socials</strong>
<ul class="socials">
......
......@@ -252,7 +252,9 @@ function my_custom_pagination($numpages = '', $pagerange = '', $paged = '', $sea
register_nav_menus(
array(
'menu-web' => esc_html__( 'Primary Menu', 'makura' )
'menu-web' => esc_html__( 'Primary Menu', 'makura' ),
'quick-link' => esc_html__( 'Quick Links', 'makura' ),
'services' => esc_html__( 'Services', 'makura' )
)
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment