Paginate results from data fetched through array

Okay! I fixed it all by myself. Adding it here so that it can help others looking for a solution. For all things ‘posts’ (and post types), WP_QUERY is your friend. Do go through all the arguments it accepts. I found out that the parameter ‘post__in’ accepts the IDs of the posts and then fetches … Read more

Default pagination is broken when use ‘static page’ as ‘front page’

the solution is dont use #static pages# and merge to functions.php Merge to functions.php the following : //http://justintadlock.com/archives/2010/02/02/showing-custom-post-types-on-your-home-blog-page add_filter( ‘pre_get_posts’, ‘my_get_posts’ ); function my_get_posts( $query ) { if ( is_home() && $query->is_main_query() ) $query->set( ‘post_type’, array( ‘works’ ) ); //else //$query->set( ‘post_type’, ‘ page’ );//$query->set( ‘post_type’, array( ‘page’, ‘post’ ) ); return $query; }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)