Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define( 'WP_DEBUG', true );
- $args = array(
- 'post_type' => 'realizacje',
- 'tax_query' => array(
- array(
- 'taxonomy' => 'category',
- 'field' => 'slug',
- 'terms' => 'kawalerki'
- )
- )
- );
- $testimonials = new WP_Query($args);
- if( $testimonials->have_posts() ) :
- ?>
- <ul>
- <?php
- while( $testimonials->have_posts() ) :
- $testimonials->the_post();
- ?>
- <li><?php printf( '%1$s - %2$s', get_the_title(), get_the_content() ); ?></li>
- <?php
- endwhile;
- wp_reset_postdata();
- ?>
- </ul>
- <?php
- else :
- esc_html_e( 'No testimonials in the diving taxonomy!', 'text-domain' );
- endif;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement