Commit e67a9512 by Muhammad Usman

category fix

parent 587d8626
Pipeline #330 passed with stage
in 0 seconds
...@@ -2,8 +2,21 @@ ...@@ -2,8 +2,21 @@
get_header(); get_header();
$tax = get_query_var('course'); $tax = get_query_var('course');
$term = get_term_by('slug', $tax, 'vq_course_taxonomy');
$args = array( $args = array(
'post_type' => 'vq_course' 'post_type' => 'vq_course',
'posts_per_page' => '-1',
'tax_query' => array(
array(
'taxonomy' => 'vq_course_taxonomy',
'field' => 'name',
'terms' => $tax
),
),
); );
$courses = new WP_Query($args); $courses = new WP_Query($args);
$courses1 = $courses; $courses1 = $courses;
...@@ -27,8 +40,7 @@ $page = get_page_by_path('lms-courses'); ...@@ -27,8 +40,7 @@ $page = get_page_by_path('lms-courses');
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="e-learning-heading"> <div class="e-learning-heading">
<h2><?php echo $page->post_title ?></h2> <h2><?php echo $term->name ?></h2>
<h3 class="lms-excerpt"><?php echo $page->post_excerpt ?></h3>
</div> </div>
</div> </div>
</div> </div>
...@@ -36,15 +48,16 @@ $page = get_page_by_path('lms-courses'); ...@@ -36,15 +48,16 @@ $page = get_page_by_path('lms-courses');
<div class="learning-profile-bg"> <div class="learning-profile-bg">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<?php echo $page->post_content ?> <?php echo $term->description ?>
</div> </div>
</div> </div>
</div> </div>
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-sm-8"> <div class="col-sm-8">
<?php if($courses->have_posts()){ ?>
<?php while($courses->have_posts()) { $courses->the_post(); ?> <?php while($courses->have_posts()) { $courses->the_post(); ?>
<div class="course-box"> <div class="course-box">
<div class="col-sm-3 col-padding" style="line-height: 0;"> <div class="col-sm-3 col-padding" style="line-height: 0;">
<?php the_post_thumbnail('thumbnail') ?> <?php the_post_thumbnail('thumbnail') ?>
</div> </div>
...@@ -64,6 +77,7 @@ $page = get_page_by_path('lms-courses'); ...@@ -64,6 +77,7 @@ $page = get_page_by_path('lms-courses');
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<?php }?> <?php }?>
<?php } else echo 'No Courses Found!'; ?>
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">
<?php echo do_shortcode('[contact-form-7 id="6212" title="Inquiry Form"]'); ?> <?php echo do_shortcode('[contact-form-7 id="6212" title="Inquiry Form"]'); ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment