Make rows disappears when user become an instructor

Home Forums Legacy Support Support queries Styling issues Make rows disappears when user become an instructor

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #14011
    duy87
    Spectator
    Hello, 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.
    #14012
    duy87
    Spectator
    add_action ('wp_footer','wplms_hide_register'); function wplms_hide_register(){ if(!is_user_logged_in()){ echo ' '; } }
    #14014
    duy87
    Spectator
    the 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!
    #14176
    Anshuman Sahu
    Keymaster
    Try this :  add_action ('wp_footer','wplms_hide_register'); function wplms_hide_register(){ if(!is_user_logged_in() || !current_user_can('manage_options')){ echo '   '; } }
    #14216
    duy87
    Spectator
    What is the shortcode of it? I want it to be different then "registerhide" Thank you.
    #14218
    duy87
    Spectator
    that does not work. Just tried it
    #14380
    Anshuman Sahu
    Keymaster
    This 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>

    ';

    }

     

    }

    #14432
    duy87
    Spectator
    I 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 you
    #14515
    Anshuman Sahu
    Keymaster

    Use the classregister_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>

    ';

    }

    }

    #14568
    duy87
    Spectator
    Hello, 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.
    #14700
    Anshuman Sahu
    Keymaster
    Add the code before the " ?>  " in that file .
    #14704
    duy87
    Spectator
    I just did. After that I could not access my WP admin dashboard. I had to remove the code from FTP.  
    #14959
    Anshuman Sahu
    Keymaster
    Can 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 .
    #14960
    duy87
    Spectator
    I 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: Author4321  
    #14961
    Anshuman Sahu
    Keymaster
    I added the code .
Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Make rows disappears when user become an instructor’ is closed to new replies.