1, Download plugin USER ROLES
2, Create “EMPLOYEE” role with custom capabilities
3, In WP settings should set from subscribe to name of your role, because you want to register just your employees (custom role)
4, There is another way: Make custom login form and set witch role will be assigned. (custom role)
Sorry I didnt really make myself clear when I asked that question, but what I need is something like this
http://www.lotustravel.se/agent (when you click on Välkommen till Lotus Travels agentsida,you get directed to a login page)
http://www.lotustravel.se/agents/
And when they logged in they will be able to download pdf’s and images
You can do it through shrotcode, where just the people who will registered/logged can view and download files. I will write it down for you in next day. You should learn new something about shortcodes, if you have time.
Here is the shortcode:
[download-link link="http://wordpress.org/latest.zip" name="Download Worpress"]
Put this into the <strong>function.php</strong>
<?php
// Allow download file just to registered and logged users
function download_file_shortcode($atts, $content = null) {
extract(shortcode_atts(array(
"span" => "4",
"offset" => "",
"title" => "",
"link" => "",
"name" => "Download File",
"notice" => "If you want to download this file, you have to be logged-in!",
), $atts));
ob_start();?>
<div class="span<?php echo $span;?> offset<?php echo $offset;?>">
<div class="download-file clearfix">
<h3><?php echo $title; ?></h3>
<?php
if ( is_user_logged_in() ) {
echo '<a href="'.$link.'"">'.$name.'</a>';
} else {
echo $notice;
}
?>
</div> <!-- end of the download-file clearfix -->
</div> <!-- end of the span offset -->
<?php $output = ob_get_clean();
return $output;
}
add_shortcode("download-link", "download_file_shortcode");
?>