Month: August 2017

WordPress change query var in specific paged

If we need some time change some parameter in a specific page then easily we can set below snippet. Add code in above loop


global $wp_query;

$wp_query->set('posts_per_page', 20);

$wp_query->query($wp_query->query_vars);

Advertisements