Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Can someone tell me the if tags for not logged in users please?


Boone Gorges
Keymaster

@boonebgorges

You’ve got the right idea but your syntax is wrong. Presumably you don’t want the button (ie the li list item) to show up at all for logged-in users. So you need to put the entire button inside of an if statement:

<?php if ( !is_user_logged_in() ) { ?><li><a href="register">Register</a></li><?php } ?>

Also, be patient! 9.5 hours to wait for help isn’t all that much time! :)

Skip to toolbar