Add pagination to table generated by wp_query

As already pointed out in comments gb_bypass_filter is not a valid parameter for WP_Query. If you want to suppress to effect of filters on your query, add ‘suppress_filters’ => true to your query arguments previous_posts_link() does not accept two arguments, only one. Unlike next_posts_link(), it does not have the second $max_pages parameter. So you can … Read more

Pagination not working with WP_QUERY

You are most probably not doing this on a static front page, so your paged parameter is using wrong values. Static front pages uses get_query_var( ‘page’ ) to calculate pagination, all other pages uses get_query_var( ‘paged’ ) You need to also set the $max_pages parameter in next_posts_link. Without that, your links won`t display <p class=”older”><?php … Read more

Show parent’s child and also child’s, child on a page?

Will get_pages() work for you? http://codex.wordpress.org/Function_Reference/get_pages If I’m understanding your question correctly, you would want something like this: $children_of_page = get_pages(array( ‘child_of’ => $post->ID, ‘parent’ => $post->ID //defining both parent and child forces the list to only include direct children. )); $children_of_first_child = get_pages(array( ‘child_of’ => $children_of_page[0][ID], ‘parent’ => $children_of_page[0][ID] )); If you wanted to … Read more

How to query post into a complex slider

I figured it out <?php $args = array( ‘post_type’ => array(‘post’, ‘music-videos’), ‘posts_per_page’ => 5, ‘orderby’ => ‘menu_order post_date’, ); $loop = new WP_Query( $args ); ?> <div id=”example1″ class=”slider-pro”> <div class=”sp-slides”> <div class=”sp-thumbnails” > <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <div class=”sp-slide”> <div class=”sp-image”> <a href=”https://wordpress.stackexchange.com/questions/181352/<?php the_permalink() ?>” title=”<?php the_title_attribute(); ?>”> <?php … Read more