Courses carousel in hompage

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #16325
    jeanko
    Member

    Hi!
    I want to create a carousel slider with courses box inside (like “our college news”, homepage example)
    How should I do this?
    Also: in a single couse page, can I put the teacher’s list (like the “department single page”)

    Thank you.

    #16331
    Veena
    Moderator

    You can use the same post snippets carousel shortcode , you just need to change post_type=”course”.

    [post_snippets_carousel id="course-carousel" post_type="course" navigation="true" post_count=6 image_size='medium' display_title=true show_meta=true display_summary=true show_excerpt="true" excerpt_count=10 hide_thumbnail="false" navigation="true"]
    
    #16348
    jeanko
    Member

    Thank you for your answer!
    And what about the other question?
    “in a single couse page, can I put the teacher’s list (like the “department single page”)”

    thanks

    #16350
    Veena
    Moderator

    Actually teachers list is showing in the course details box already.

    Anyways you can achieve this by adding the below code in file single-course.php at line no:184

    $staff_ids = get_post_meta($post->ID, 'mo_staff_for_course', true);
                             if (!empty($staff_ids)) {
                                $args = array(
                                    'post_type' => 'staff',
                                    'header_text' => __('Our Faculty', 'mo_theme'),
                                    'display_summary' => true
                                );
                                $query_params = array(
                                    'post__in' => $staff_ids,
                                    'orderby' => 'menu_order',
                                    'order' => 'ASC');
                                mo_display_custom_post_snippets($args, $query_params);
                            }
    
    #16459
    jeanko
    Member

    Thank you, works fine!
    I’ve replaced the “related course” code with this one, otherwise the code doesn’t works

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Courses carousel in hompage’ is closed to new replies.