another post a page problem

“The problem I have it that on the first 8 pages only 1 article is displayed.” That would be due to this line of code: if ( $wp_query->get( ‘paged’) < 8 ) { $wp_query->set( ‘posts_per_page’, 1); } See here for more info: codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters EDIT: Try adding brackets as mentioned by @kaiser… Here’s your original code … Read more

The pagination doesn’t work

If this is a new WordPress install, it is likely that you don’t actually have enough posts to require pagination, and thus the pagination links aren’t appearing. Quick test: ensure you have at least two posts, then go to Dashboard -> Settings -> Reading, and change the “Posts Per Page” setting to 1. Do you … Read more

Comment submission & navigation redirects to default language

I’ve figured out the solution to my problems. Here’s what I did… Note: This is considering the posts, thus comments, are under the ‘Article‘ post-type, which thus create the permalink such as this: site.com/article/post-name/#comments. Adjustments should be made for other uses. To fix problem #1 & #3: if ( !is_admin() ) add_filter(‘get_comment_link’, ‘my_comment_post_redirect’); function my_comment_post_redirect($location){ … Read more

Problems with pagination for a custom post type

Store your new WP_Query() in a variable Globalize $wp_query Move the $wp_query swap-hack to after your new WP_Query() generation Pass the variable to $wp_query, not the new WP_Query() call itself. e.g. <?php // Custom query args $press_query_args = array( ‘post_type’ => ‘press’, ‘orderby’ => ‘post_date’, //’showposts’ => ’10’, ‘posts_per_page’ => $paged, ); // Custom query … Read more

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