1

I am using directory listing on my site. I only want to allow logged in users to have access to the listing and file download.

on my /direct folder I have index.php:

<?php
require_once('../wp-load.php');
if ( !is_user_logged_in() ) {
   auth_redirect();
}
?>

After verifying that the user is logged in how can I show the directory listing. I know the directory listing by itself work without index.php. I want to know what programming condition I need to follow to allow logged in user to see/download files after user verification is done.

Thanks

Your Answer

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

Browse other questions tagged or ask your own question.