Category page with posts from 2 different childcategories

To include posts from one or more specific categories, you can use and define category__in parameter in your WordPress query. Like this, here is an example. $args = array( ‘category__in’ => array( 11, 15 ), ); $my_query = new WP_Query( $args ); if ( $my_query->have_posts() ) : while ( $my_query->have_posts() ) : $my_query->the_post(); get_template_part( ‘content’, … Read more

Query custom post type and showing its content

You are not closing the second while loop. You’ll probably want something like this: <?php /* * Template Name: Testimonials */ ?> <?php get_header(); ?> <div class=”container”> <div class=”content-page”> <h1><?php wp_title(); ?></h1> <title><?php wp_title(); ?></title> <?php $query = new WP_Query( array(‘post_type’ => ‘testimonials’, ‘posts_per_page’ => 5 ) ); while ( $query->have_posts() ) : $query->the_post(); ?> … Read more