Home › Forums › Legacy Support › Support queries › Styling issues › Make rows disappears when user become an instructor
- This topic has 14 replies, 2 voices, and was last updated 9 years ago by Anshuman Sahu.
Viewing 15 posts - 1 through 15 (of 15 total)
-
AuthorPosts
-
December 15, 2015 at 3:04 pm #14011duy87SpectatorHello, You have sent me once a code where When anonymous person becomes an user, custom row disappears. Now I need to make rows disappear for users that become an instructor. Would you send me please the code with the shortcode? Thank you.December 15, 2015 at 3:06 pm #14012duy87Spectatoradd_action ('wp_footer','wplms_hide_register'); function wplms_hide_register(){ if(!is_user_logged_in()){ echo ' '; } }December 15, 2015 at 3:09 pm #14014duy87Spectatorthe reason I want it is that once user becomes an instructor, the form to "become an instructor" should disappear just to not confuse users. Credentials: www.kurzon.cz/wp-admin username: Author password: Author4321 Thank you!December 16, 2015 at 12:06 pm #14176Anshuman SahuKeymasterTry this : add_action ('wp_footer','wplms_hide_register'); function wplms_hide_register(){ if(!is_user_logged_in() || !current_user_can('manage_options')){ echo ' '; } }December 16, 2015 at 4:51 pm #14216duy87SpectatorWhat is the shortcode of it? I want it to be different then "registerhide" Thank you.December 16, 2015 at 4:58 pm #14218duy87Spectatorthat does not work. Just tried itDecember 17, 2015 at 12:58 pm #14380Anshuman SahuKeymasterThis is not a shortcode i guess you have asked for the button to hide when the user is logged in . For that you have add the class to the button register_hide . refer the old topic .
add_action ('wp_footer','wplms_hide_register');
function wplms_hide_register(){
if(is_user_logged_in() || !current_user_can('manage_options')){
echo '
<style>.register_hide{display:none !important;}</style>
';
}
}
December 17, 2015 at 4:34 pm #14432duy87SpectatorI am sorry if I made it unclear. I want exactly the same thing when I asked you to send me a code to hide register button for students. Now I Want it for instructors but not fot register button, but for hiding Instructor sign up Form. So, I need a new code that would hide the Instructor sign up form Once user becomes an instructor by adding a shortcode. I hope you understand me :) its almost the same thing like the previous topic. Now only for instructors. Thank youDecember 18, 2015 at 8:11 am #14515Anshuman SahuKeymasterUse the class : register_inst_hide add_action ('wp_footer','wplms_hide_register');
function wplms_hide_register(){
if(is_user_logged_in() && current_user_can('edit_posts') && !current_user_can('manage_options')){
echo '
<style>.register_inst_hide{display:none !important;}</style>
';
}
}
December 18, 2015 at 2:03 pm #14568duy87SpectatorHello, unfortunetlly the new code is showing on top of my website. I guess there might be a little miss in the code. Please check the attached image. I really appreciate it.December 19, 2015 at 11:27 am #14700Anshuman SahuKeymasterAdd the code before the " ?> " in that file .December 19, 2015 at 11:53 am #14704duy87SpectatorI just did. After that I could not access my WP admin dashboard. I had to remove the code from FTP.December 21, 2015 at 1:55 pm #14959Anshuman SahuKeymasterCan you please share your site url and admin credentials to add the code properly in your site ,at my test site it is not causing any errors. PS: mark reply as private while sharing the info .December 21, 2015 at 1:56 pm #14960duy87SpectatorI already did above... Please, make sure if you screenshot my website, there will not be showing my website URL or the name of the website... I want to keep it in secret because it is not launched yet. Thank you for understanding. www.kurzon.cz/wp-admin username: Author Password: Author4321December 21, 2015 at 1:57 pm #14961Anshuman SahuKeymasterI added the code . -
AuthorPosts
Viewing 15 posts - 1 through 15 (of 15 total)
- The topic ‘Make rows disappears when user become an instructor’ is closed to new replies.