我希望添加注册的课程,这里的课程进度是两个if语句。如果需要更多信息,请告诉我。
我想展示单独注册课程进度的课程。
/*
Course registered
*/
echo '<!-- Course info shortcode -->';
if($courses_registered):
?>
<div id="ld_course_info_mycourses_list">
<h4><?php _e('You are registered for the following courses', 'learndash') ?>
<?php foreach($courses_registered as $c) { ?>
<div class="ld-course-info-my-courses"><?php /* echo get_the_post_thumbnail($c); */ ?>
<?php echo '<h2 class="ld-entry-title entry-title"><a href="' . get_permalink($c) . '" rel="bookmark">'.get_the_title($c).'</a></h2>'; ?>
</div>
<?php } ?>
<br/>
</div>
<?php
endif;
/*
Course progress
*/
if($course_progress):
?>
<div id="course_progress_details">
<h4><?php _e('Course progress details:', 'learndash') ?></h4>
<?php foreach($course_progress as $course_id => $coursep) { $course = get_post($course_id); if(empty($course->post_title)) continue; ?>
<p><strong><?php echo $course->post_title ?></strong>: <?php _e('Completed', 'learndash') ?> <strong><?php echo $coursep['completed'] ?></strong> <?php _e('out of', 'learndash') ?> <strong> <?php echo $coursep['total'] ?> </strong> <?php _e('steps', 'learndash') ?><br/></p>
<?php } ?>
</div>
<br>
<?php
endif;