Pagination stays on same page for post category

query_posts = _your_doing_it_wrong as soon as you throw in that nasty query_posts you are killing off all the global variables and your paging will not work. change: query_posts( array( ‘post_type’ => ‘fieldtrips’, ‘fieldtripcategory’ => ‘elementary-school-aquifer’, ‘order’ => ‘ASC’, ‘posts_per_page’ => 1 ) ); if ( have_posts() ) : while ( have_posts() ) : the_post(); to: … Read more

Paginate the_content automatically? [duplicate]

Use the <!–nextpage–> tag http://codex.wordpress.org/Write_Post_SubPanel#Quicktags can be used any number of times in a post, and each insert will “break” and paginate the post at that location. Hyperlinks to the paginated sections of the post are then generated in combination with the wp_link_pages() or link_pages() template tag.

Pagination between images (active/inactive)

The previous_image_link() only prints something if the there is a previous image. Similarly for next_image_link(). The problem is that you’re styling the containing span element – which always exists. Instead you should style the a tag inside the span (which only appears when there is a next/previous image). Alternatively, digging into the source, both previous_image_link … Read more

Conditional category query breaking?

i’m not sure what you are trying to achieve w/ the $paged variable. seems like you could simplify your query though $posts_per_page = is_paged() ? 5 : 2; $args=array( ‘post_type’=>’post’, ‘category_name’ => ‘featured-content’, ‘posts_per_page’ => $posts_per_page ); $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query($args); edit, adding an offset (and fixing syntax errors): $paged … Read more

Adding pagination to sub-wp_query within a singular post page

You need to add a query var and rewrite rule to make that work. First, add the query var to WordPress query vars array in your theme’s functions.php: add_filter( ‘query_vars’, ‘wpa58904_query_vars’ ); function wpa58904_query_vars( $query_vars ){ $query_vars[] = ‘my_page’; return $query_vars; } Then add a rewrite rule with your desired pattern that sets your custom … Read more

Pagination for custom post types

Try to do a little research. This is documented all over the googlesphere. http://css-tricks.com/snippets/wordpress/paginate-custom-post-types/ http://wordpress.org/support/topic/custom-post-type-taxonomy-pagination?replies=14

error code: 521