BuddyBoss Home – Web › Support Forums › Solutions › Social Learner › Remove slider on Log In?
Tagged: slider
- This topic has 9 replies, 3 contibutors, and was last updated 8 years, 11 months ago by Anonymous.
Question
October 14, 2015 at 6:03 am #48683@concisecoursesIs 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
October 14, 2015 at 10:47 am #48706@
AnonymousHi @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 DubeyOctober 16, 2015 at 9:22 am #48851@concisecoursesworked great thanks
October 18, 2015 at 1:02 am #49002@
Anonymous🙂
November 3, 2015 at 5:05 am #50469@concisecoursesWhat 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!
November 3, 2015 at 5:56 am #50481@
AnonymousHi @concisecourses, Use this code :
<?php if ( is_user_logged_in() ) { Your Vimeo code } else { get_template_part( 'content', 'slides' ); } ?>
Regards
PallaviDecember 23, 2015 at 7:11 am #54926@concisecoursesI 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″ width=”500″ height=”292″ frameborder=”0″ webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>} else {
get_template_part( ‘content’, ‘slides’ );
}
?>December 23, 2015 at 8:50 am #54932@
AnonymousHi @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
December 23, 2015 at 12:46 pm #54950@concisecoursesThat’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!
December 24, 2015 at 2:01 pm #55006@
AnonymousHi @concisecourses, Please make the video’s width to 100% for full width.
Regards
- The question ‘Remove slider on Log In?’ is closed to new replies.