BuddyBoss Home – Web Support Forums Solutions Social Learner Remove slider on Log In?

Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Question

    #48683
    @concisecourses

    Is it possible to remove the slider when the student has logged in? I’d prefer to send the logged in student to their courses. Thanks

    Answers

    #48706
    @vapvarun

    Hi @concisecourses, you can remove the slider on the basis of conditional logic.
    It will need to modify the front-page.php with following codes
    replace

    
    <?php get_template_part( 'content', 'slides' ); ?>
    

    with

    
    <?php
    if ( !is_user_logged_in() ) {
    get_template_part( 'content', 'slides' );
    } 
    ?>
    

    Regards
    Varun Dubey

    #48851
    @concisecourses

    worked great thanks

    #49002
    @vapvarun

    🙂

    #50469
    @concisecourses

    What about adding a vimeo video to front-page.php?

    So once the user has logged in then the slider disappears and then the video appears.

    Is that possible?

    Thanks!

    #50481

    Anonymous
    @

    Hi @concisecourses, Use this code :

    
    <?php
    if ( is_user_logged_in() ) {
    	Your Vimeo code
    } else {
    	get_template_part( 'content', 'slides' );
    }
    ?>
    

    Regards
    Pallavi

    #54926
    @concisecourses

    I copied and pasted your above suggestion (i.e. to include the Vimeo Video, and it causes a 500 Error…any idea why? Thanks!

    ++++++++++++

    <?php
    if ( is_user_logged_in() ) {

    // Your Vimeo Code
    <iframe src=”https://player.vimeo.com/video/432167337&#8243; width=”500″ height=”292″ frameborder=”0″ webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>

    } else {
    get_template_part( ‘content’, ‘slides’ );
    }
    ?>

    #54932

    Anonymous
    @

    Hi @concisecourses, Add this code and replace the url of vimeo player for another video.

    
    <?php
    if ( is_user_logged_in() ) {
    	echo '<div class="vimeo-article"><iframe src="https://player.vimeo.com/video/432167337" width="800" height="500" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>';
    } else {
    	get_template_part( 'content', 'slides' );
    }
    ?>
    

    Regards

    #54950
    @concisecourses

    That’s great thanks – it works.

    However, it is possible to center or make the video full width? Do you know where the <div class=”vimeo-article”> is located, maybe that can be edited?

    Thanks!

    #55006

    Anonymous
    @

    Hi @concisecourses, Please make the video’s width to 100% for full width.

    Regards

Viewing 10 posts - 1 through 10 (of 10 total)
  • The question ‘Remove slider on Log In?’ is closed to new replies.