Jump to content
Sign in to follow this  
Henry Perkins

Hiding menu items from logged in users

Recommended Posts

Henry Perkins

Hello, I'm trying to hide my "Register" menu item from users that are already logged in. I'm editing "pagelines/sections/nav/section.php" and adding this code

	if ( is_user_logged_in() )
	     echo ''; );
	
just under
	if(function_exists('wp_nav_menu'))
	    wp_nav_menu( array('menu_class'  => 'main-nav'.pagelines_nav_classes(), 'container' => null, 'container_class' => '', 'depth' => 3, 'theme_location'=>'primary', 'fallback_cb'=>'pagelines_nav_fallback') );
	

Now, I am getting this error on my homepage:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /nfs/c08/h02/mnt/118968/domains/liveonshuffle.com/html/wp-content/themes/pagelines/sections/nav/section.php on line 45
Any suggestions or help would be appreciated. Thank you, Henry

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×