shafan
Forum Replies Created
-
You are welcome sir,
I Tried opening the links in new Tab as well as on different browsers. but its shows all messed up with no picture at all.Hello Sir,
1) the prnt.sc links you sent doesnt show anything.. Secondly i have done something
This is the code i am using to show the prerequisites in the course page
<?php
$post_id = get_the_ID();
$meta6 = STM_LMS_Helpers::parse_meta_field($post_id);
$meta6_fields = array();
if(!empty($meta6[‘prerequisites’])) {
$meta6_fields[esc_html__(‘Prerequisites’, ‘masterstudy-lms-learning-management-system’)] = array(
‘text’ => $meta6[‘prerequisites’],
);
}
if(!empty($meta6_fields)): ?>
<?php foreach($meta6_fields as $meta6_field_key => $meta6_field): ?>
<h3 style=”font-size: 31px;margin-bottom: 35px;”><?php echo sanitize_text_field($meta6_field_key) ?>?</h3>
<?php
$id = $meta6_field[‘text’];
$args = array(
‘post_type’ => ‘stm-courses’,
‘posts_per_page’ => 3,
‘per_row’ => 3,
‘post_in’ => array( $id ),
‘post__not_in’ => array( $post_id )
);
$q = new WP_Query( $args );
if( $q->have_posts() ):
STM_LMS_Templates::show_lms_template( ‘courses/grid’, array( ‘args’ => $args ) );
endif;
endforeach;
else:
endif;
?>but its showing wrong courses..
when i echo $id is shows course ids like this
421,416,349
which are the ids of the courses i added in the course setting page in admin panel. But when i echo $args it shows “Array”Thats what i want. The code to show the courses which are added in the course setting page in admin panel.
It should be some code instead of the method how to add a course in course setting page.Thank You
Actually the idea behind this is to show Prerequisites courses of each course which will be added ofcourse in course setting in each course in a tab. The same way we can show Description, Curriculum and FAQs
Hello,
I already have a Pro version which is provided by my client and i can also add Prerequisites from course settings which means Prerequisites addon is already enabled. My question is how i can show Prerequisites courses for a specific course in front-side of the website the same way we show related course.Thank You