View Full Version : WP Menu Glitch/Bug

05-28-2012, 03:03 PM
Hey Guys,

So I've added a menu to my custom WP theme, which all is good with. However, when I refresh the page, an extra blank title in the menu shows up. Is there a fix to this? Did I do something wrong?

Here is a image of what I am talking about:

<div id="navbar">
<?php wp_nav_menu( array( 'menu' => 'Primary Menu', 'container' => false,'menu_id' => 'main-nav','depth'=>'2')); ?>
<div id="login" >
<?php if (!(current_user_can('level_0'))){ ?>
<form name="loginform" id="loginform" action="<?php echo get_option('siteurl'); ?>/wp-login.php" method="post">

<input value="Username" class="input" type="text" tabindex="10" name="log" id="user_login" style="padding-left: 2px;" onfocus="if (this.value == 'Username') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Username';}" />
<input value="Password" class="input" type="password" tabindex="20" name="pwd" id="user_pass" style="padding-left: 2px;" onfocus="if (this.value == 'Password') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Password';}" />
<input name="wp-submit" id="wp-submit" tabindex="100" value=" " type="submit" class="loginbutton" >
<input name="redirect_to" value="<?php echo get_option('siteurl'); ?>" type="hidden">
<input name="testcookie" value="1" type="hidden">

<a class="helpbutton" href="<?php echo get_option('home'); ?>/wp-login.php?action=lostpassword"></a>
<?php } else { ?>
<ul class="admin_box">
<li><a href="<?php echo get_option('home'); ?>/wp-admin/">Dashboard</a></li>
<li><a href="<?php echo get_option('home'); ?>/wp-admin/post-new.php">Write New Post</a></li>
<li><a href="<?php echo get_option('home'); ?>/forums">Forums</a></li>
<li><a href="<?php echo wp_logout_url('$index.php'); ?>">Log out</a></li>
<?php }?>