Pagination, query more pages at once

offset would skip posts, it sounds like you want the current page number * the number of posts per page- $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $posts_per_page = $paged * get_option(‘posts_per_page’); $args = array( ‘posts_per_page’ => $posts_per_page ); You’ll need to keep in mind that total number of pages in the query object will … Read more

query_posts by category_name and custom taxonomy

$args = array( ‘post_type’ => ‘post’, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘channel’, ‘field’ => ‘slug’, ‘terms’ => array( ‘news’, ‘comedy’ ), //this is by slug ), array( ‘taxonomy’ => ‘category’, ‘field’ => ‘term_id’, ‘terms’ => array( 103, 115, 206 ), //this is by id ) ) ); $query = new WP_Query( … Read more

All categories displays the same posts

query_posts breaks the main query object ($wp_query) which holds the query object and all relevant query info which breaks all conditional tags and pagination and page functionality, which simply means that it is totally useless trying to use any info regarding the main query object as it was all corrupted by query_posts resetting the main … Read more

Bootsrap carousel for post

You have added active class in all slides. Due to this all slides is displaying. You have to add active class to first slides only. Check below bootstrap slider code- <div class=”carousel-inner” role=”listbox”> <div class=”item active”> <img src=”https://wordpress.stackexchange.com/questions/235599/…” alt=”https://wordpress.stackexchange.com/questions/235599/…”> <div class=”carousel-caption”> … </div> </div> <div class=”item”> <img src=”https://wordpress.stackexchange.com/questions/235599/…” alt=”https://wordpress.stackexchange.com/questions/235599/…”> <div class=”carousel-caption”> … </div> </div> … … Read more

Loop through custom taxanomy in post and display custom fields from posts

You are going to need set up a new WP_Query in your content-*.php with the correct parameters in order to send it into a loop. <?php $args = array( ‘tax_query’ => array( array( ‘taxonomy’ => ‘recipes’,. ‘field’ => ‘slug’, ‘terms’ => ‘dessert’ ))); $your_posts = new WP_Query( $args ); ?> You can add any other … Read more