I am using "user specific content" plugin, using this I can hide particular blog content for specific user role. But I want to hide content including post title. What I meant is only the specific user can see the post content & post title. And post title along with post content should be hide for blocked user. I know there is some custom coding for it that I have to do in plugins file. But I don't have any idea how to do coding for it and where to place the code. Can anyone give me suggestion for code and for where I have to place this custom code?
Asked
Active
Viewed 36 times
0
-
I think you have to create custom role – Vasim Shaikh Dec 21 '16 at 06:39
-
admin side or front end? you can simply hide using css. add_action('admin_head', 'my_custom_fonts'); function my_custom_fonts() { echo ''; } – Mohamed Rihan Dec 21 '16 at 07:01
-
$user = wp_get_current_user(); if ( in_array( 'author', (array) $user->roles ) ) { echo the css here.. } – Mohamed Rihan Dec 21 '16 at 07:03
-
1no this is wrong way – Vasim Shaikh Dec 21 '16 at 07:05
-
front end side. – softech Dec 21 '16 at 07:36