Jump to content
Sign in to follow this  
eartist

Adding custom code to prompt login for private page?

Recommended Posts

eartist

I have made some pages on my site private but when I click the links to go to them it does not show a "Please login to view this page" prompt but goes to a "404 Error" page. I found the PHP code to prompt the login but when I go to my Pagelines settings I dont know where to add it? Can someone point me in the right direction. Thanks - WordPress newbie.

Share this post


Link to post
Share on other sites
eartist

I found this code but dont know where to put it if (is_user_logged_in()) { // You page code goes here } else { echo "You must be logged in to view this page."; }

Share this post


Link to post
Share on other sites
cmunns

You will have to add a hook through the Base child theme. There is some documentation on it. www.pagelines.com/docs/base-child-theme probably use the 'pagelines_before_theloop' hook at first?

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  

×