Hide button Student and show Instructor

Home Forums Legacy Support Support queries Other issues Hide button Student and show Instructor

Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #354461
    Mediaeffective
    Participant
    Hi, can you help me hide a button? the idea is that when a student enters he cannot see the button but when an instructor enters the course, she can access that button. https://prnt.sc/122lya0
    #354495
    Ada
    Participant
    Hi, Please share this course URL and your admin credential for the site here in private reply. Then only I can check and share the code if possible.
    #355032
    Mediaeffective
    Participant
    This reply has been marked as private.
    #355128
    Ada
    Participant
    Hi, I'm not sure what you are saying in your last reply but as per your first post on this topic if you want to hide this button for students then Please try adding this given code in wplms-customizer.php
    
    function hide_button_for_student() {
        $user = wp_get_current_user();
        if ( !current_user_can('edit_posts') ) {
        //The user has the "student" role
        ?>
        <style>
    .page-id-163 .elementor-element.elementor-element-4c6f5a9.btnteacher.elementor-widget.elementor-widget-button {
        display:none !important;
        }
    </style>
    <?php 
    }}
    
    add_action('wp_head', 'hide_button_for_student');
    
    
    You can download wplms customizer plugin from here https://wplms.io/support/knowledge-base/wplms-customizer-plugin/ install the plugin and activate it. Then goto plugin editor >>wplms-customizer.php and add the code in the last Then share if it hides this button https://prntscr.com/128pjjf
    #355430
    Mediaeffective
    Participant
    thanks for helping
    #355465
    Ada
    Participant
    Hi, Please confirm, Can I close this topic ?
    #357683
    Mediaeffective
    Participant
    thank you, you can close this topic
    #357747
    Ada
    Participant
    Closing .
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Hide button Student and show Instructor’ is closed to new replies.