Display Purchased Courses?

Home Forums Legacy Support Support queries How-to & Troubleshooting Display Purchased Courses?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #38203
    mas6ce
    Spectator
    I would like to create a new page displaying a user's purchased courses.  Is there a shortcode or something I could use to do this?  Thanks!
    #38367
    H.K. Latiyan
    Participant
    WPLMS is a LMS you do not need the make shift approach of creating pages for displaying my courses section. The purchased courses are available in user profile. You do not need to create any page for this. You can enable auto-notification and emails as well when the user purchases a course. My courses section can also be added in the menus so there is no need
    #38432
    mas6ce
    Spectator
    I've had a terrible time with Buddypress and am now using Ultimate Members - I know the theme has a lot of integration with Buddypress, but those are features I don't need to use.  I would like to create a separate page so that I can link it up with the Ultimate Members plugin.
    #38518
    mas6ce
    Spectator
    Is there a way to do this?
    #38743
    mas6ce
    Spectator
    Okay I have made some progress - I copied the code from my-courses in the wplms theme folder in cPanel into a PHP code editor plugin then inserted that shortcode into the profile tab I want to display the courses on.  Functionally, the content is there, but it's not pretty (I attached a screenshot so you can see what I mean) - does anyone know how to format the content?   Another thing I'm struggling with is removing the instructors from the site - I'm the only one who will be uploading courses and I'd like to remove the "admin" presence from the site by removing the instructor label from courses.  I tried the recommendation here: (https://wplms.io/support/knowledge-base/removing-instructors-profile-link-from-name-in-course-page/) but that didn't do anything :(   I really appreciate any help!  This website was supposed to launch weeks ago but I'm stuck behind these issues :(
    #38746
    H.K. Latiyan
    Participant
    I wish I could help you in changing your experience with BuddyPress. You can add this code in the and use the shortcode [wplms_my_courses]
    add_shortcode('wplms_my_courses','wplms_get_my_courses');
    
    function wplms_get_my_courses( $atts, $content = null ) {
        extract(shortcode_atts(array(
    	  'user_id'   => get_current_user_id()
        ), $atts));
    
        $course_ids = bp_course_get_user_courses($user_id);
        if(empty($course_ids))
        	return '<div class="message">No courses found !</div>';
        $count = count($course_ids);
    
        if($count >= 6){
        	$class= 'col-md-3';
        }else if($count >= 3){
        	$class= 'col-md-4';
        }else{
        	$class= 'col-md-2';
        }
    
        echo '<div class="row">';
        foreach($course_ids as $course_id){
        	echo do_shortcode('[course id="'.$course_id.'" featured_block="course2"]');
        }
        echo '</div>';
        $return ='<div class="pullquote '.$style.'">'.do_shortcode($content).'</div>';
        return $return;
    }
     
    #38751
    H.K. Latiyan
    Participant
    Please do note that WPLMS is a buddypress theme so it would not be possible for us to provide you with shortcodes for all the functionality in wplms. I would still recommend you to use BuddyPress, third party plugins like ultimate member can not replace Buddypress plugin which is maintained by WordPress team for around for 8 years now.
    #38787
    mas6ce
    Spectator
    Thank you for your help!  Where should I put the code in the directory?  I understand Ultimate Member can't do it all, but I think I can make them work together as far as I need them to.
    #38834
    H.K. Latiyan
    Participant
    My bad I forgot to write where to put the code. Please put the code in the wplms-customizer.php file in your wplms customizer plugin.
    #38949
    mas6ce
    Spectator
    That worked great thank you so much for your help!! :)
    #39126
    H.K. Latiyan
    Participant
    Thanks for confirming. So marking the topic as resolved and closing the topic.
Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Display Purchased Courses?’ is closed to new replies.