I am using a simple force login plugin that works great "Force Login By Kevin Vess".

I have a subfolder (right now in /wp-content/subdir/") that i want to also force login for but cant figure how.

Is there a way to accomplish this?


This was easier than i thought



chdir( '../' );
include 'wp-load.php';

if ( is_user_logged_in() ) :  ?>

// Do stuff

<?php endif; ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.