Hot answers tagged


As I far I know, get_posts() function can not be used to paginated results. It is intended to get an array of posts and it sets no_found_rows to true by default from WP 3.1. Pagination won't work unless you set it to false, or better, use WP_Query. numberposts is also a invalid argument. $paged = ( get_query_var( 'page' ) ) ? get_query_var( 'page' ) : 1; ...


Try this in your functions.php file: add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 200, 200 ); Read More:


With is_paged you are testing whether a post has been divided in parts using the QuickTag. But with next_posts_link you are pointing to the next page of posts. So you probably need another test.


You are setting null to $wp_query then querying get_query_var( 'paged' ) this is expected that you will get this error! First query get_query_var( 'paged' ) then set the original $wp_query to null Example:- $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; global $wp_query; $temp = $wp_query; $wp_query = new WP_Query( ...

Only top voted, non community-wiki answers of a minimum length are eligible