Frequently Asked Questions

[TRUEMAG]- Course Listing Page - List All Courses In A Category
Last Updated 3 years ago

By default, to create a course listing like, 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.'';
else : ?>


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

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

Please Wait!

Please wait... it will take a second!