Adding a second loop breaks everything

The root problem here is a missing endif; on the second loop. But, there are a few changes we can make to improve this and make things work, this loop, will work a lot better: <h3>Other standards</h3> <div class=”row”> <div class=”col-12″> <?php $query = new WP_Query( [ ‘post_type’ => ‘page’, ‘post_parent’ => 27, ‘posts_per_page’ => … Read more

Excluded Custom Taxonomy Term Posts Displaying in loop

Try below methods: Try by adding term ID in array like this ‘exclude’=> ’60’ in array If this is not working you can try with below WP_Query loop: $args = array( ‘post_type’ => ‘careers’, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘careers_categories’, ‘field’ => ‘term_id’, ‘terms’ => array( 60), ‘operator’ => ‘NOT IN’, … Read more

Loop two different category WP_Query

Your final outlook is a bit tricky to achieve using traditional way. Lets assume both category has at least 6 post. Now first grab the posts using get_posts() not WP_Query $side_news = get_posts(array( ‘post_type’ => ‘post’, ‘category_name’ => ‘category-slug-1’, ‘posts_per_page’ => 6 )); $side_news2 = get_posts(array( ‘post_type’ => ‘post’, ‘category_name’ => ‘category-slug-2’, ‘posts_per_page’ => 6 … Read more