March 3, 201016 yr Hey guys, Does anyone know of a plugin for wordpress that would allow me to set a specific page to be viewable only by logged in members? This is for a client who deals with cannabis (legally) and doesn't want the general public/bots to be able to view the page. I don't want the whole site to be login required.. just specific pages that I choose. Thanks for any suggestions.
March 3, 201016 yr When you create a page template, and where you want the content to go, paste this: <?php global $user_ID; if( $user_ID ) : ?> <?php if( current_user_can('level_10') ) : ?> ONLY LEVEL 10 (ADMIN) CAN SEE THIS <?php else : ?> OTHERS SEE THIS <?php endif; ?> <?php endif; ?> Read about user levels here.
Create an account or sign in to comment