Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'pre_get_posts', 'include_cpt' );
- function include_cpt( $query ) {
- global $wp_query;
- if ( is_page( array( 'ricerca-sport-e-corsi-mare', 'ricerca-sport-e-corsi-terra', 'ricerca-altri-sport' ) ) ) {
- if ( $query->is_tax() && $query->is_main_query() ) {
- $query->set( 'post_type', array('corsi'));
- }
- return $query;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement