Breaking up content into smaller-sized pages to be viewed individually
10
votes
3answers
8k 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', ...
10
votes
5answers
992 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 ...
10
votes
1answer
126 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:
...
6
votes
1answer
174 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
314 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
3answers
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 ...
5
votes
5answers
693 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
4k 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
187 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
155 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
67 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
216 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
6answers
2k 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 ...
4
votes
2answers
1k 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 ...
4
votes
4answers
3k 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 ...
4
votes
1answer
3k 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
1answer
584 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
587 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
189 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
260 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
338 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
49 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
91 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
1answer
1k 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 ...
3
votes
2answers
224 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
2answers
778 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
2answers
2k 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
2k 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 ...
3
votes
1answer
794 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
177 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
770 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
1answer
2k 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 ...
3
votes
2answers
2k 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
249 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
467 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 ...
3
votes
1answer
400 views
Custom Post Type Archives by Date (stored as meta value) WP3.1
I would like to implement date-based archive functionality (similar to original WP Archives widget functionality) for custom post type (CPT). What makes it difficult is the fact that I need to group ...
3
votes
2answers
105 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
459 views
Keep Pagination in Tabs
Is there a way to have pagination on multiple tabs?
I have a page the has 5 tabs, each tab has filtered content from the same posts. For example:
Tab 1 - All Posts.
Tab 2 - Posts with Keyword ...
2
votes
3answers
3k views
Pagination with custom SQL query
I have my own SQL string to select Custom Post Type posts with specific WHERE clause. I've used the offset and limit to return appropriate posts depending on a page being displayed. That's working ...
2
votes
2answers
363 views
Next_posts_link() works only with original $wp_query
I've got custom template that I want to display paged blog posts. This is the beginning of my file:
$wp_query = new WP_Query($args);
if($wp_query->have_posts()){
...
2
votes
2answers
855 views
Displaying Numeric Pagination vs. Previous and Next Links in WordPress?
By default, WordPress shows previous and next links when content is split onto different pages. Is there a way to get it to use proper pagination (with numbers), perhaps with a plugin?
2
votes
1answer
5k views
wp_pagenavi() with custom wp_query()?
<?php
/*
Template Name: Projects
*/
?>
<?php get_header();?>
<section id="content">
<section id="main">
<?php
$loop = new ...
2
votes
2answers
2k 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. ...
2
votes
1answer
229 views
Pagination with custom post types results in 404 issues
I've a very simple index.php:
<div id="content">
<? get_template_part('content', get_post_format()) ?>
</div>
<div id="pagination">
<? previous_posts_link() ?>
...
2
votes
1answer
38 views
How to no follow the paginated comments
I am trying to find a way to add rel="nofollow" to my comments pagination links.
Can anyone provide me with a hook or way to do so?
2
votes
2answers
64 views
Different amount of posts on homepage than paged pages
I've done some searches here and on Google but everything I'm finding isn't working correctly. I was hoping to post my code here and get help with where I'm going wrong.
On the index page of my ...
2
votes
3answers
3k views
Custom post type pagination 404 fix?
Been trying to get this working all day but haven't had any luck...
I have a custom post type called 'news' and an archive template (archive-news.php), here I'd like to show 2 posts with pagination, ...
2
votes
2answers
397 views
Automatically create pages in a post based on number of words
I need a method to automatically create pages (using <!--nextpage-->) in posts based on number of words.
For example... A post containing 1200 words should be broken down into 6 pages with ...
