WordPress multiple loops with default pagination

try now this code <?php $paged = ( get_query_var( ‘paged’ ) ) ? get_query_var( ‘paged’ ) : 1; $title = get_term_by(‘slug’, get_query_var(‘term’), get_query_var(‘taxonomy’) ); $args = array( ‘post_type’ => ‘suppliers’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘ad_category’, ‘field’ => ‘slug’, ‘terms’ => array(‘basic_advertiser’), ), array( ‘taxonomy’ => ‘supplier_categories’, ‘field’ => ‘slug’, ‘terms’ => $title->slug, ), … Read more

Loop by category and meta_key

get_the_category() will retrieve the category of current loop item. In your case, it’s probably the last post of your main archive query. To get the category of currently displayed category in the archive page, you can use get_queried_object_id(): // Check if this is a category archive if ( is_category() ) { // Get the current … Read more

How to display a loop of custom post types in columns

This is an HTML/CSS question. Your PHP is mostly fine as is. You just need to remove the <br> from your code. Then, in your CSS, use ‘float’ to make the columns out of the divs. More info https://learn.co/lessons/css-column-structure-using-floats

CPT: multiple loops with different terms

Have found the solution I only have to add the right tax_query… $posts_info = new WP_Query(array( ‘post_type’ => ‘tarife’, ‘posts_per_page’ => 3, ‘post_status’ => ‘publish’, ‘post__in’ => $products, ‘orderby’ => ‘title’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘tarif_kategorie’, ‘field’ => ‘slug’, ‘terms’ => ‘info’, ), ), )); $posts_gf = new WP_Query(array( ‘post_type’ => ‘tarife’, ‘posts_per_page’ … Read more