Breaking up content into smaller-sized pages to be viewed individually

learn more… | top users | synonyms (1)

13
votes
3answers
11k views

Pagination not working with custom loop

I've got a custom loop that I'm using to display some Real Estate listings that will be available within 60 days. I'm calling it with the following function: <?php $sixtydays = date('Y/m/d', ...
11
votes
1answer
252 views

Why do you need an unlikely integer in paginating?

The paginate_links Codex function reference has some sample code that's being reposted all over the net. It has a section that uses a variable called $big = 999999999; // need an unlikely integer: ...
10
votes
5answers
1k views

Custom pagination for custom post types (by names)

I have two custom post types that deal with people's names. Right now, in browsing views, it just lists them all alphabetically and the pagination breaks them down by numbers, which isn't terribly ...
8
votes
1answer
2k views

Is it possible to paginate posts correctly that are random ordered?

I found this problem on Wordpress Support and the topic unfortunately is now closed. I have this same issue... (read below) We have created a site where members can recommend things like favourite ...
6
votes
6answers
3k views

Paged posts - how to use numbers and next/previous links?

I want wp_link_pages (mutli-page posts) to display the page numbers, the word "previous" before those numbers, and a "next" after those numbers. It would look like this: Prev 1, 2, 3, 4 Next I'm ...
6
votes
4answers
5k views

Pagination resolving to first page only

My pagination is only linking to the same posts that are on my front page. I have 3 posts on my front page, when I press next it goes to /page/2 but only shows the same 3 posts, with no previous ...
6
votes
3answers
3k views

How to determine if I'm on the first page of pagination?

How do I determine if I'm on the very first page of pagination? I'm using WP_Pagenavi. I want to run a function only on the first page of the pagination. I checked the query_var 'paged', it's set to 0 ...
6
votes
4answers
2k views

How to show a single post on the front page but have normal paging?

I would like to have a single post on my front page (always the latest), but let normal paging work. So the front page has post 1, the next page should have post 2-11 (1-10 is fine too), then 12-21 or ...
6
votes
1answer
295 views

post pagination names, not numbers

currently, using <!--nextpage--> on a post pulls just numbers. What I would like is to be able to name each page break, and then call the name instead of just a number. Something like: ...
6
votes
2answers
614 views

Problem with add_rewrite_rule and pagination (paged and page query_vars)

I have a custom taxonomy named location and I want to add sections like 'news' and 'marketplace' for each term, so my url looks like /location/montreal/news/ It works perfectly until I try to add ...
5
votes
2answers
3k views

Change the “page” slug in pagination

Simple question. When pagination is activated, the URL changes to "site.com/page/2". For my site, this should be "site.com/paggetto/2". How can I change that rewrite rule? I also want to change ...
5
votes
6answers
3k views

How can I make wp-pagenavi work on a custom query built upon a form submission?

I've also posted this on the wordpress support forums, for scribu's wp-pagenavi plugin: http://wordpress.org/support/topic/plugin-wp-pagenavi-custom-query-form-submit-part-2?replies=1 My situation: ...
5
votes
1answer
5k views

Paginate result set from $wpdb->get_results()

Is there an easy way to paginate the result set coming from $wpdb->get_results()? I want to get a paginated list of a user's comments on the author_archive page - some of the users of the community ...
5
votes
1answer
199 views

Help making my pagination plugin better

I'm not sure if this is the right place to ask for this kind of help since is not an actual question but hopefully I can learn a thing or two. I'm developing a plugin (my first one) inspired in the ...
5
votes
1answer
222 views

Date based URLs for custom posts and pagination

I have created a custom permalink structure for a custom post type (events) using the code below: $GLOBALS["wp"]->add_query_var("event_year"); $GLOBALS["wp"]->add_query_var("event_monthnum"); ...
5
votes
1answer
79 views

Allow variable amount of comments before pagination

There is an option in the admin settings allowing you to define how many comments should be listed before creating a new page for the next ones. I would like to have the same number of comments for ...
5
votes
2answers
339 views

Reverse comment pagination numbers

I would like to reverse the comment pagination numbers so that the newest comments show on page 1 instead of the last page. I did an array_reverse for the comments_array and set the Wordpress ...
4
votes
1answer
2k views

How to fix pagination for custom loops?

I have added a custom/secondary query to a template file/custom page template; how can I make WordPress use my custom query for pagination, instead of using the main query loop's pagination? Addendum ...
4
votes
1answer
4k views

Custom Taxonomy not working with posts_per_page in new WP_query (pagination problem)

OK, so i'm messing with Custom Taxonomies for the second time and in both instances i've run into this problem where using the posts_per_page argument in either a query_posts or WP_query scenario.. ...
4
votes
2answers
4k views

Custom Post Type Archive Page: Set Posts Per Page, Paginate

I have a custom post type called video. Would like to paginate its archive page, showing only 3 posts on each page. There is also a custom loop on the archive page that outputs all the video posts ...
4
votes
1answer
882 views

Display “Page 3 of 5” for a paginated post

I have a custom post type that I want to display the page you are on and how many pages total in this manner "Page 3 of 5" (meaning you are on page 3 of a 5 page post). These don't have to be links, ...
4
votes
1answer
805 views

next_posts_link not working for loop called with ajax

On my homepage I display a loop of posts that I allow to be replaced by ajax search results and other custom loops. Those results are returned in a template with a custom wp_query. The issue is ...
4
votes
1answer
275 views

Query causing load because of SQL_CALC_FOUND_ROWS post counting?

I found this query causing some load in the server, my hosting provdier asked me to look on it. SELECT SQL_CALC_FOUND_ROWS wp_posts I think this select no. rows found in wp_posts table.. but i ...
4
votes
1answer
3k views

How To create ajaxed wp-pagenavi?

I'm using WordPress as a Facebook platform and have a page that shows posts from 2 different categories. Each category has it's own pagination using wp-pagenavi. In order to stay in Facebook I need ...
4
votes
1answer
236 views

Different 'posts_per_page' setting for first, and rest of the paginated pages?

How do you set the posts_per_page query setting so that a different number of posts are displayed on the first of the paginated pages (of home, archive, search, etc.) and the rest of them? For ...
4
votes
1answer
470 views

Aggregate comments, with pagination

I want to build a page that would display all comments, regardless of which post they're attached to. I also want that page to be paginated, since it'll potentially have 10,000+ comments. I'm not ...
4
votes
1answer
578 views

WordPress search: pretty URLs (permalinks), custom post types and pagination

I have three separate search boxes on my website: species CPT search, glossary CPT search and a general search which I'd like to search post and species post types. My questions are threefold, ...
4
votes
1answer
826 views

How to paginate wordpress [gallery] shortcode?

I am using wordpress gallery shortcode [gallery] I was wondering if there is anyway to paginate them without using a plugin.
4
votes
6answers
3k views

Get the current page URL (including pagination)

Is there a WP function to automatically get the correct URL of the current page? Meaning if I just opened a single post, the function returns the same as get_permalink(), but if I'm on a paginated ...
4
votes
1answer
59 views

How can I see all of a post's comments on a single page as a reader, if pagination is enabled?

Is there an URL I can access, or an argument that can be passed, to disable pagination on the reader's side? The blog uses standard Wordpress comment pagination, i.e., ...
4
votes
1answer
108 views

Multiple Paginations on one Page

I have a page template which aggregates multiple CPT's in different areas of the page and displays the first post from each CPT. I'd like to add a separate pagination for each of them. Is it possible ...
4
votes
2answers
3k views

Infinite scroll / lazy loading with NextGen Gallery

I'm working on a project for a friend that involves a massive page with 3,000+ photos. See: http://www.thepurplepixie.com/projects/purple-pixies-people-project/ Currently, I have pagination set to 50 ...
3
votes
3answers
5k views

How to add CSS Class to previous_post_link or get previous/next post link URL

How can I add a CSS Class to the previous_post_link output or just get the URL and create the HTML markup myself
3
votes
2answers
527 views

Why does pagination always break when used on any form of a home page?

Why does WP pagination break when used on the homepage? If you take the code below and use it in a page template it works perfectly (make sure you have 3 or more posts). However, as soon as you use ...
3
votes
3answers
4k views

get_query_var( 'paged' ) not working outside of homepage

Twenty Eleven Theme... On the home page, I have successfully filtered the loop to display just "Featured" posts with pagination functioning properly through nav links. I'm trying to display posts ...
3
votes
2answers
2k views

How do I paginate search results for custom post types?

I have a Custom Post Type called "cars" that stores several custom fields along with the standard Title/Description fields. I need users to be able to search through the CPT based on the custom fields ...
3
votes
1answer
3k views

How to display pagination links for WP_User_Query?

I think I'm nearly there with this, but I can't get the pagination links to show for a directory of authors I'm creating. My code is below, but I don't know how to get the links to navigate between ...
3
votes
1answer
1k views

Changing the URL Structure of a Paginated Custom Post

I have a custom post type for slideshows that creates a paginated post and each slide is a separate page. The data for each slide is saved in the custom fields and each slide has a title set saved in ...
3
votes
2answers
3k views

Using paginate_links() to generate “1, 2, 3 … 10, 20, 30, 40… 55” paginations

I found this code : // Get total number of pages global $wp_query; $total = $wp_query->max_num_pages; // Only paginate if we have more than one page if ( $total > 1 ) { ...
3
votes
2answers
3k views

Pagination with WP_Query is buggy - working for some pages, but not the others

I'm having a very peculiar bug with pagination :( I'm trying to display 4 posts per page for a category with slug "lastest-news". The pagination function seems to work correctly. There are 33 posts. ...
3
votes
1answer
1k views

How can i retrieve default post per page value? from settings->reading. And total number of posts?

I want to retrieve the default value of Post per page (the value that is set in settings->reading. I've looked around and so far I've only found ways to query it. problem is i dont want to change ...
3
votes
1answer
1k views

Find out total number of pages in global query on archive page?

I'm trying to find out whether there is more than one page of posts (I've set my posts per blog page to 5 in the reading settings) in a custom category template. I would think the global query would ...
3
votes
2answers
248 views

Pagination for sub-pages

I have a top level page with a lot of subpages. When a user visits the top level page they currently see the titles/thumbnails/excerpts of all of the subpages. How can I paginate the display of the ...
3
votes
1answer
1k views

Single Page View for Paginated Posts

Okay, so you know how you can break up a wordpress post by inserting the next-page/page break quicktag. Then, using the wp link pages function in your template, wordpress will generate page 1, 2, 3, ...
3
votes
2answers
795 views

Non-Linear Questionnaires in Wordpress

I want to make the following happen in Wordpress People answer questions in paginated or single page form. Each next set of options is dependent on the option the user selects preiviously At the ...
3
votes
2answers
198 views

How do I prevent one of two multiple loops from repeating on a second page?

I have a page with multiple loops, but the first loop repeats on the second (or Older) page. I want to keep the formatting but stop the post from repeating. You can see the problem here: ...
3
votes
2answers
3k views

URL rewrites and pagination

I must say that I am a complete nooby at Wordpress custom URL rewrites. I have searched for past many days to find a clear explanation of how to determine and write correct pattern for URL rewrites. I ...
3
votes
1answer
275 views

Custom Post Type pagination - normal solutions aren't helping

I have multiple custom post types and I need to be able to query them and page through them. This is the query I am trying: $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; ...
3
votes
1answer
1k views

Modifying WP_LIST_AUTHOR Functions to output all users in a grid (and Paginate)

The title says it all. I've been taking WP_LIST_AUTHOR and modifying it to create more of a member directory than just a list of authors while leaving a lot of the original options intact (and I am ...
3
votes
1answer
547 views

Get next/previous cousin page

Hey Guys, I'm trying to build pagination links for the next/previous cousin page. For example, my page structure is like this: Top Level A a1 a2 B b1 b2 When I'm on a2, I want the 'Previous ...