Display All Courses in Course Archive Page
I am Developing Course Management Website.
I have main post type Course, under Course I have different taxonomies like Institution, Location, Course Type and etc..
The problem is, if one Course selected to particular Institution that post displaying, but I need to display that particular Course again with different Institution, if I select different Institution.
How would I do that? This is my Course archive page code,
div class=container
div class=row
?php
$argsCourse = array(
'posts_per_page' = '-1',
'post_type' = 'course',
'orderby'= 'menu_order',
);
?
?php
$mycourse_query = null;
$mycourse_query = new WP_Query($argsCourse);
if( $mycourse_query-have_posts() ) {
while ($mycourse_query-have_posts()) : $mycourse_query-the_post();
$Maincoursetypes = get_the_terms( $post-ID, 'course-type' );
$Maincourselocations = get_the_terms( $post-ID, 'location' );
$Maincourseinstitutions = get_the_terms( $post-ID, 'institution' );
?
div class=col-md-4
div class=fv-locataion-type
div class=fv-locataion-item-img
a href=?php the_permalink(); ? aria-label=Blog Image
?php if ( has_post_thumbnail() ) {
the_post_thumbnail();
} else { ?
img src=?php bloginfo('template_url'); ?/assets/images/blog-placeholder.jpg
alt=?php the_title(); ? /
?php } ?
/a
?php if('yes' == get_field(featured)) :?
div class=fv-locataion-tag
?php echo POPULAR COURSE; ?
/div
?php endif;?
/div
div class=fv-ltag?php the_title(); ?/div
p class=sub-courseFashion Design amp; Technology/p
div class=fv-filter-icon-wrap
?php if($Maincourseinstitutions){?
?php foreach ( $Maincourseinstitutions as $Maincourseinstitution)
$image = get_field('institution_logo', $Maincourseinstitution);
{?
img src=?php echo $image? alt=
?php }
}else{
echo img src='https://develop.stanventures.com/fv/wp-content/uploads/2022/03/ina.png' height='100%' width='110' /;}?
p?php echo $Maincourseinstitution- name;?/p
/div
ul class=c-list
lii class=uil uil-check-square/i Collaboration: ?php the_field(collaboration);?/li
lii class=uil uil-clock/i Duration: ?php the_field(course_duration);?/li
?php if($Maincourselocations){?
?php foreach($Maincourselocations as $Maincourselocation) {?
lii class=uil uil-map-marker/i ?php echo $Maincourselocation-name;?/li
?php } }
else{echopLocation not Specified/p;}
?
/ul
div class=fv-link-wrap
a href=?php the_permalink(); ? class=btn btn-primary fv-btn
spanView Courses/span/a
/div
/div
/div
?php endwhile;
}wp_reset_query(); // Restore global post data stomped by the_post().
?
/div
/div
Topic custom-post-type-archives php custom-post-types Wordpress
Category Web