Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
Fix #20, modify Courses taxonomy archive pages to match main Courses …
Browse files Browse the repository at this point in the history
…archive
  • Loading branch information
admturner committed Feb 5, 2020
1 parent 18a7d5f commit c6b571d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
function modify_courses_archive_query( $query ) {
// Make sure it isn't an admin query and is a main front-end query.
if ( ! is_admin() && $query->is_main_query() ) {
if ( $query->is_post_type_archive( Setup\WSUWP_HRS_Courses::$post_type_slug ) ) {
if (
$query->is_post_type_archive( Setup\WSUWP_HRS_Courses::$post_type_slug ) ||
$query->is_tax( 'course_tag' ) ||
$query->is_tax( 'learning_program' )
) {
// Change the query to display X posts per page.
$query->set( 'posts_per_page', -1 );

Expand Down

0 comments on commit c6b571d

Please sign in to comment.