Frequently Asked Questions

[TRUEMAG]- Course Listing Page - List All Courses In A Category
By default, to create a course listing like http://demo.cactusthemes.com/jasper/course-category/course/, you have to create a parent category Course. Then, you create 2 sub-categories (Graduate & Undergraduate Courses) and create courses inside those sub-categories.
To list all courses in a category (ex:Graduate Courses, Undergraduate Courses), open /html/taxonomy-coursecategory.php, delete or comment (adding two slash (//) add the beginning) those lines:

-----------------------------------------------
$cat_children = get_term_children( $category->term_id, 'coursecategory');
------------------------------------------------
if(count($cat_children)) :
for($i = 0; $i < count($cat_children); $i++):
$children = get_term_by('id', $cat_children[$i], 'coursecategory');
echo ''.$children->name.'';
-------------------------------------------------------------
endfor;
else : ?>




-------------------------------------------

then change these lines:
'terms' => $children->term_id,
'field' => 'id',

into
'terms' => $category,
'field' => 'slug',



 Last updated Tue, Aug 23 2016 5:09pm

Please Wait!

Please wait... it will take a second!