query posts only works on the first page

As @Pieter Goosen said, you shouldn’t be using query_posts, nor running your own query. Instead, override the main query that already runs: function wpse_144974_pre_get_posts( $wp_query ) { if ( ! is_admin() && $wp_query->is_main_query() && is_home() ) $wp_query->set( ‘cat’, 1 ); } add_action( ‘pre_get_posts’, ‘wpse_144974_pre_get_posts’ );

How to display search query as formatted text?

You’ll probably want filter out some parameters, change the order they’re displayed, etc – but this should get you started: $s = “/?s=Search&property_city=las-vegas&property_location=Nevada&min_price=20000&max_price=500000&beds=2&baths=3&min_area=1000&max_area=1000000&property_type=apartment&s=Search&apor=Any&apvr=Any&post_type=property”; parse_str($s,$parts); foreach ($parts as $key => $value) { $name = ucwords(str_replace(“_”,” “,$key)); echo “$name: $value<br />\n”; } You can probably just use foreach ($_REQUEST as $key => $value) { unless there’s a … Read more

WordPress Numeric Pagination with Query String [duplicate]

It looks like the paged variable isn’t being added to the query arguments. This should work: $paged = ( get_query_var(‘paged’) ) ? get_query_var( ‘paged’ ) : 1; $args = array( ‘post_type’ => ‘animals’, ‘posts_per_page’ => 4, ‘category’ => $queryString, ‘paged’ => $paged ); $wp_query = new WP_Query( $args ); Also, as a note, $wp_query is … Read more