Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Customize the Loop
- remove_action( 'genesis_loop', 'genesis_do_loop' );
- add_action( 'genesis_loop', 'my_cpt_taxonomy_custom_loop' );
- function my_cpt_taxonomy_custom_loop() {
- global $paged;
- global $query_args; // any wp_query() args
- // Get term
- $term = get_query_var( 'term' );
- $args = array( 'order' => 'ASC',
- 'orderby' => 'title',
- 'tax_query' => array(
- 'relation' => 'OR',
- array(
- 'taxonomy' => 'location',
- 'field' => 'slug',
- 'terms' => $term
- ),
- array(
- 'taxonomy' => 'services',
- 'field' => 'slug',
- 'terms' => $term
- ),
- array(
- 'taxonomy' => 'keyword',
- 'field' => 'slug',
- 'terms' => $term
- )
- ),
- 'paged' => $paged
- );
- // Accepts WP_Query args (http://codex.wordpress.org/Class_Reference/WP_Query)
- genesis_custom_loop( wp_parse_args( $query_args , $args ) );
- } // End my_cpt_taxonomy_custom_loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement