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

learn more… | top users | synonyms (1)

21
votes
1answer
14k 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 ...
13
votes
4answers
14k 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', ...
2
votes
2answers
3k 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()){ ...
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 ...
0
votes
1answer
2k views

How to paginate a list of tags

I have a page that displays a list of all tags of my blog. Iuse this code which works fine: <?php $poststocount=get_tags($args); echo '<h2>Alphabetic Index of All '</h2>'; ?> ...
3
votes
2answers
4k views

paginate_links() don't properly work in search.php?

I'm using this in my search.php template … <div class="pagination"> <?php echo get_pagination_links(); ?> </div> And this is the function … function get_pagination_links() { ...
12
votes
1answer
3k 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 ...
1
vote
1answer
810 views

How to paginate attachments in a secondary query as gallery?

I have this code that shows all images attached to my post-type. Is there a way to paginate those? I have like 25 pics and I wan't to avoid scroll as much as I can. Code: <div class="galleries ...
1
vote
1answer
5k views

Multiple WP_Query loops with Pagination

There are a few other questions about this (and WP_Query pagination seems to be a huge question for a lot of people) so I'm trying to narrow down exactly how to make it function. I'm able to create a ...
5
votes
2answers
4k 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 ...
8
votes
6answers
5k 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 ...
0
votes
1answer
217 views

How do I sort multiples pages?

I want to use a dropdown to sort a list of posts in WordPress. The results will display on multiple pages. So how do I pass the query on to the second, third, fourth, etc. pages? Here's an example of ...
3
votes
1answer
201 views

Have different number of posts on first page

I need to have a different amount of posts per page on the first page that on the other pages. For example, this is what I need Total posts: 6 First page: showing 3 posts Following page: showing 2 ...
5
votes
1answer
6k 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 ...
3
votes
1answer
2k 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 ...
4
votes
1answer
2k 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.
0
votes
6answers
6k views

How to style current page number (wp_link_pages)?

When a post is split on more pages TwentyTen theme use the native function wp_link_pages to display a navigation page bar at the end of post. I am trying to style those elements for my theme, but ...
2
votes
3answers
2k views

Non existing blog pages are not redirected to 404

I've got a page called Blog. In the Settings -> Reading I've set my Blog page as Posts page. In the menu when I click on the Blog link the posts are loaded correctly and pagination works, so far so ...
1
vote
3answers
2k views

query_posts and pagination, still stuck after much research

I need to paginate some custom posts...I can’t see why but I’m getting 404’s when going to the next page. Here’s my code: $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts( ...
0
votes
2answers
443 views

Custom wp_query pagination - next_posts_link() or wp_pagenavi() always empty

I'm aware this is a topic discussed to death, but I have read through many solutions and can't understand why my pagination simply isn't working. I have a very simple custom wp_query: $current_page ...
0
votes
2answers
297 views

how could I get the pagination as I want to when query posts using get_posts function

I am using WP3.5, and I have a post_list.php which will show all the posts order by post date DESC. Everything is ok except pagination. I have 15 posts, for test purpose, I want to every page show 2 ...
0
votes
1answer
556 views

Having trouble generating pagination links on custom query

I'm using a custom query on a page after the initial loop to list some posts from a category I'm associating with that page. Im doing this: query_posts(array( 'category_name' => $name, ...
3
votes
1answer
4k 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
2answers
4k 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
2k views

Custom Post Type Rewrite Rule for Author & Paging?

I'm using WordPress 3.0.1 and I have made custom post-type called 'dienasgramatas'. My plugin also makes custom rewrite rules for displaying all posts from this post type and even custom permalink ...
1
vote
2answers
4k views

Custom post type archive with pagination?

I have a custom post type called 'projects' (pastebin) and I have a page called Projects set up in my dashboard which is set to display the Projects template. (pastebin) The problem is when I use ...
5
votes
6answers
5k views

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

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: ...
2
votes
2answers
4k views

WordPress Paginate $wpdb->get_results

Due to a complex multisite config, I have a query which combines the posts from two blogs and I would like to paginate the results. I am grateful for any help. I have posted my query. ...
0
votes
1answer
324 views

Help With A Reverse Pagination Plugin

I saw this presentation about why pagination on the Internet is weird. https://speakerdeck.com/u/espylaub/p/pagination-on-the-internet-and-why-its-weird It inspired me to try and make a WordPress ...
4
votes
1answer
815 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 ...
2
votes
3answers
914 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 ...
1
vote
1answer
1k views

Custom Post Type Pagination Doesn't Work in Wordpress 3.4

I have a problem when using Wordpress 3.4. My "Products" custom post type pagination doesn't work. Here is the code I use $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $loop = new ...
1
vote
1answer
675 views

posts_per_page & pagination conflict

I have a custom query to display my custom post type. posts_per_page set to '5'. In admin post per page set to '10' (settings => Reading => Blog pages show at most 10 posts) My template lists 5 posts ...
0
votes
2answers
915 views

How to adjust found_posts so that it accounts for offset and pagination

So far this is the code I have in my index.php file: <?php // Custom code to offset posts and setup pagination $page = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; ...
0
votes
2answers
8k views

WP_query and pagination?

I have to get some custom post types and need to do that with WP_Query (query_posts doesn't work). How can I do the pagination? Whatever I tried didn't work... any help would be awesome I can't crack ...
0
votes
4answers
705 views

Pagination throws 404

I'm experiencing some problems with my pagination when displaying custom post types. I would like to display 9 posts and then display a numeric pagination. This is working, some links are generated ...
4
votes
1answer
340 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
5k 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.. ...
2
votes
1answer
520 views

Custom Post Type Pagination & duplicate posts

I'm working on a template which will use some custom-post-types & custom-taxonomies.. I'm having problems with pagination and duplicate posts. HOME.PHP LOOP #1 On the homepage (home.php) I have ...
1
vote
1answer
51 views

Move pagination numbers above plug-ins

I'm having the following problem: I want to move the generated page numbers from <!--nextpage--> to appear below the post body, above the plugins (WordPress Related Posts, WP Author Box Lite ...
1
vote
2answers
102 views

Pagination Not Displaying on Custom Term Archive

I am trying to achieve pagination on a custom template I have that displays on an archive of terms. It appears to be working because when I navigate to mysite/taxonomy/page/2/ or 3,4,5 etc. the ...
1
vote
3answers
461 views

Previous and Next Post link doesn't work

In single.php I tried to add inside the loop the previous_post_link and next_post_link. But nothing is rendered when a view the source of the site. I added the previous_post_link inside an h4 tag to ...
1
vote
1answer
188 views

pagenavi with merged wp_query [duplicate]

i need to use wp_query to excute posts from 2 separated keywords using s=keyword so i have found this answer & it is very very useful Combining queries with different arguments per post type ...
1
vote
2answers
533 views

pagination doesn't show up for custom post type

Another user on here suggested that my use of queries was incorrect so I'm changing the code. However, the pagination in the first block of code (below) isn't showing up in the HTML while the second ...
1
vote
1answer
362 views

Setting pagination for images attached to a post

I am trying to figure out how to paginate a post for it's images. I have a custom post type set up to act like a gallery - images only. And would like to paginate the images. I am having a hard time ...
1
vote
1answer
687 views

Pagination is not working wp_query custom fields values

All I want those post having post_type == profile And wpcf-gender == 1 (male). I tried this code $wp_query = new WP_Query( array( 'meta_key' => 'wpcf-gender', 'meta_value' => ...
1
vote
1answer
1k views

Sorting archive pages with “pretty” URLs?

We want the users to re-order the posts on a page similar to pagination but I can't find anything anywhere! It would be great to create a link to a url similar to .../page/2/title/, title being the ...
1
vote
3answers
2k views

Authors list Pagination?

WordPress has a built in function to display a list of all of your site’s authors. But there is no option to display their avatars, so all you really get is a text list that links to the author’s ...
0
votes
1answer
99 views

Pagination on child category returns 404

Can anyone figure out why viewing pages in my child categories results in a 404, when the same $paged code works fine for my index file? This is inside of my category-15.php (it's to affect all child ...
0
votes
1answer
694 views

Show single post then all posts (with pagination)

On my single.php I would like to show the single post then list all the posts with a pagination. I use the following code: <?php while ( have_posts() ) : the_post(); ?> <!-- Show single ...