Community Forums › Forums › Archived Forums › General Discussion › How, Restricted content for employees
- This topic has 5 replies, 2 voices, and was last updated 9 years, 4 months ago by peterhoeg.
-
AuthorPosts
-
November 4, 2014 at 9:16 am #130415peterhoegMember
Hello All.
Im in the process of making a site on http://www.peterhoeg.dk using the Enterprise Pro.
I want to have a private section invisible for the normal users/customers, but visible for my 30 employees with 30 individual users, all with the same limited responsibility area (read only). No need for registration, as I will be making the 30 individual user/passwords.
I should be the only one to post information /upload files in that area and they should just access this area with a login/password. I imagine that this private section is placed on top of the existing website, so all normal content ALSO is visible to the logged in user employees. But this is not an absolute requirement, an separate site/login program area could also do it.
Furthermore I need to have an overview of all the users/password.
How is the most optimal way? I've searched tons of members plugins, but since my employees shouldn't pay for anything, like blogging members, I don't think these options suits me?
I've also tried various login possibilities, but have learned that I don't want the users to be loggin into the wordpress genesis program with Dashboard etc. (genesis bar on top). = Instead I want a restricted area allowing the users to "long into the website itself"
Is there a must-need plugin that I've missed? (Im new to Genesis Studiopress)
Kind Regards Peter
November 4, 2014 at 9:57 am #130427Brad DaltonParticipantMembers by Justin Tadlock or S2member are 2 of the best plugins.
Otherwise, i would just code the template so only logged in users can view the page and upload/download files.
November 4, 2014 at 11:34 am #130443peterhoegMemberOkay - Actually I'm already experimenting with Members,Justin but a need a php code to individual content (whether you are logged in/out). Im following these steps, http://www.sridharkatakam.com/how-to-set-up-a-private-client-area-in-wordpress/
<?php
if ( current_user_can('client') ) :
wp_nav_menu( array( 'menu' => 'client_menu', 'menu_class' => 'builder-module-navigation') );else :
wp_nav_menu( array( 'menu' => 'main_menu', 'menu_class' => 'builder-module-navigation') );endif;
?>but is frustrated about step 7, the code above, because it isn't fitting my genesis child theme. Do you know the solution, since this step is suited for the iThemes Builder? I think I need a specific code to show the hidden menu items for logged in users.
I have created a custom navigation named client_menu for logged in users and a normal navigation menu called main_menu.November 4, 2014 at 11:53 am #130448Brad DaltonParticipantNovember 5, 2014 at 7:39 am #130583peterhoegMemberI've tried looking at various codes, but unfortunately still with no luck 🙁
I need my custom menu to show when users are logged in (client_menu) and my standard menu to show to unregistered users (main_menu).
Im trying with this code, but it doesn't seem to work?
function my_wp_nav_menu_args( $args = '' ) {
if( is_user_logged_in() ) {
$args['menu'] = 'client_menu';
} else {
$args['menu'] = 'main_menu';
}
return $args;
}
add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' );}
Do you know Brad, what could be the missing point ? 🙁
Kind regards Peter
November 5, 2014 at 7:52 am #130586peterhoegMemberArh, removed the } at the bottom - now solved 🙂
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.