Menu bar… simple hack needed
-
Hi,
I have a single-page-scroll WordPress theme – the issue I have is in the primary navigation. The navigation works fine IF the page title and navigation title are identical.
In several cases however, I want to shorten the navigation title in the menu (and have a longer page title). Can any coding guys / girls help me with the below… I’m convinced I need to change the title to the slug but I’ve tried a few options and can’t get it to work!
Many thanks in advance !
/* Define link target slug for on-page navigation */
$slug = strtolower( str_replace( ” “, “-“, $menu_item->title ) ); ?>
#page-<?php echo $slug; ?>”>
<?php if($menu_item->description != ”) { ?>
<span class=”anchor”><?php echo($menu_item->title); ?></span><span class=”description”><?php echo($menu_item->description); ?></span>
<?php } else { ?>
<?php echo($menu_item->title); ?><?php echo($menu_item->description); ?>
<?php } ?>
<i class=”fa <?php echo $icon_code; ?>”></i>
The topic ‘Menu bar… simple hack needed’ is closed to new replies.