Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
By default in wordpress subscriber have only access of viewing profile. But I want to allow some access apart from their profile? Suppose I want to allow subscriber to create posts and access one WP-Plugin.

What I have tried:

I dont have any Idead, Is it possibel? If yes plz help me
Posted
Comments
ZurdoDev 6-May-16 8:06am    
Doesn't WordPress security allow you to do this?
arvindispra 6-May-16 8:22am    
If we make custom role for WP site, then we can provide some access?
I am using this code It created Role But now allowing which I want.

$result = add_role(
'custome_role',
__( 'Custom' ),
array(
'read' => true, // true allows this capability
'edit_posts' => true,
'delete_posts' => false, // Use false to explicitly deny
'edit_users' => true,
'edit_mytour' => true, //plugin

)
);
if ( null !== $result ) {
echo 'Yay! New role created!';
}
else {
echo 'Oh... the custome_role role already exists.';
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900