Questions tagged [pagination]

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

535 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
439 views

Custom Taxonomy Endpoint Pagination using paginate_links()

The Setup I have 2 taxonomies and 1 post type: Post Type: products Hierarchical Taxonomy: product_cat Nonhierarchical Taxonomy: product_type The product-category has a defined endpoint: ...
5
votes
0answers
253 views

How to load paginated post pages via ajax

Here's the case I got: I've setup post pagination for my website and everything works well. Except one thing - on every new page request all the resources are loaded again. This makes the website ...
4
votes
1answer
597 views

Implementing a general Table of Content across single paginated post pages

I am working on a blog and most of my posts are so long they require pagination. See one of my posts. This post has a lot of pages. The only problem is that I can't find a way to show a table of ...
4
votes
2answers
4k views

Display all posts from all categories with pagination

Alright, this might be a tricky one to explain but I'll do my best. At the front page I want to display all the posts from all the categories. However I want them to be divided. Take this for an ...
3
votes
0answers
427 views

Taxonomy page lead to 404 page on pagination

I read a lot of posts here with similar problems but nothing worked for me. I have a custom taxonomy (portfolio_category) for my custom post type. I created a taxonomy template (taxonomy-...
3
votes
0answers
758 views

How to use pagination with get_post_meta

I have a Products Page that i am using to add products using custom metaboxes this is the code for my page <div class="container products"> <div class="row"> <?php $...
3
votes
2answers
2k views

List posts based on first letter of posts

I want add a pagination How can I do this on both loop.php and search.php. I want show alphabetic index to search only posts with starting letter = [E] for example. Right now, if I search with E it ...
2
votes
0answers
44 views

Multiple WP_Query loops with Pagination Not Working

Please can anyone help me out here? I'm really stucked with this code. I want to create a multi post loop on my home page with each loop having its own pagination. The first loop is for recent post, ...
2
votes
0answers
30 views

Comment pagination - How to show determined number of comments on the first page?

I set 10 comments for every page. If I have 20 comments, it shows 10-10 on the first and last page. However if I have 11 comments, it shows 1 comment on the first page. How to display 10 comments on ...
2
votes
1answer
242 views

Skip first post on Category Archive

I have created a filter to skip first post of the archive on "podcast" category. Below is the code. add_filter( 'pre_get_posts', 'amd_limit_posts'); function amd_limit_posts($query){ if (...
2
votes
0answers
198 views

Custom taxonomy list and sortby letter pagination problem

I'm getting a taxonomy list page with pagination using this code : <?php $sortby = $_GET['sortby']; if(isset($_GET['showall'])): $args = array('hide_empty' => 0); else: $page = (get_query_var('...
2
votes
1answer
464 views

Wordpress custom URLs for pagination pages

I’m trying to find a way to make custom URLs for each pagination page separated by <!--nextpage--> tag. For example, if the first page is: myblog.com/my-topic/ the second one will be: myblog....
2
votes
0answers
89 views

Add 'articles' prefix before blog posts url without affecting pagination

I tried this solution for adding 'articles' prefix before blog posts on URL. function filter_post_link($permalink, $post) { if ($post->post_type != 'post') return $permalink; return '...
2
votes
0answers
284 views

Order Wordpress Custom Taxonomy Pages & Pagination Not Working

I'm using this code to enable custom post types and taxonomies on my site (I've also included this below to save linking out) https://gist.github.com/kasparsd/2924900 The code works great for the ...
2
votes
0answers
391 views

Custom pagination with WP_Query generating 404 error

I'm using WP_Query to generate a custom loop on my blog page. My current blog page is assigned to a page called "Blog" and this page is using the default template file (index.php). Here's a piece of ...
2
votes
1answer
514 views

Pre get posts for single post

I pre get posts for a events archive page: http://www.netzwerk-leipziger-freiheit.de/veranstaltungen/ function my_pre_get_posts( $query ) { // do not modify queries in the admin if( is_admin() ){...
2
votes
0answers
112 views

Custom query in archive.php with pagination nightmare

I want to run a custom query showing only subcategories of a specific category inside my archive.php with pagination. But, for some reason, it keeps counting (and paginating) by the number of post ...
2
votes
0answers
171 views

Display only the current page number and another numbered page in pagination

I need some help with pagination. The pagination should only display the current page and another numbered page, like so: << | 2 | …3 | >> At the moment, it shows all page numbers: <...
2
votes
1answer
134 views

Adding default pagination to wordpress loop

I am trying to add default pagination to my Wordpress loop but am unsure where to begin, most guides explain how to create custom numbered pagination. I simply need the default wp pagination. (newer ...
2
votes
0answers
251 views

Frontend sorting

Here is what I am trying to accomplish: Which partly works already, I can sort with 2 dropdowns and have a pagination. I have to merge both dropdowns into one, and add "posts per page" without ...
2
votes
0answers
178 views

changing comment-page-# to something like review-page-#

When you enable pagination for comments in wordpress the typical pagination page for a comment is "comment-page-1" "comment-page-2" etc. what I want is this to appear like "review-page-1" "review-page-...
2
votes
0answers
1k views

multiple loops with pagination on the same page

I'm searching the web for this answer for three weeks now. Tried many things but nothing seems to work as how it should work. There must be a kind of trick what probably won't make sense to anybody ...
2
votes
1answer
657 views

Display post links under month in paginated archive

I'd like to create an archive that lists posts under a month header. The months would just be plain text and the post titles, obviously, would link to the posts themselves! So: October 2013 Post ...
2
votes
1answer
160 views

Pagination problem

I have two custom rewrite rules: add_rewrite_rule('foo/bar/?', 'index.php?post_type=foo', 'top'); add_rewrite_rule('foo/bar/([a-z]+)/?', 'index.php?post_type=foo&bar=$matches[1]', 'top'); Which ...
2
votes
1answer
381 views

Converting multiple loops into one single loop with pagination

I am using Isotope jquery plugin to filter/sort posts in Wordpress but to correctly filter the posts into the right order I have needed to output each category one after the other. To do this I've ...
2
votes
2answers
306 views

Find first image on paginated post for Pinterest

I've been looking for days, yet can't find a good answer. Perhaps the SE crowd can be of assistance. Any help is much appreciated. I am using a custom-coded pinterest button included on posts that ...
2
votes
0answers
127 views

wordpress pagination, links appear but go nowhere when clicked

First let me say that, ive been digging for the past 2 hrs and the problem is that, although the links do appear on the bottom of the page where i place the function that calls the pagination. when ...
2
votes
1answer
764 views

How can I paginate image attachments in a post?

I have a post with attached images and I was able to display the images but I'm can't seem to find a way to paginate the results. I am using get_children but now I'm wondering if my method of ...
1
vote
1answer
22 views

Add Pagination on Custom Post Type Archive

I've moved custom posts on what would normally be an archive template over to a dedicated page template. I've been following this article: https://jasonyingling.me/use-page-custom-post-type-archive-...
1
vote
1answer
23 views

Modify WP_List_Table pagination “item(s)” text?

I'm developing a plugin which creates several custom tables on pages in the WP dashboard. My question is whether it's possible (without modifying core files) to change the text displayed in the ...
1
vote
0answers
23 views

How to add pagination to wpbakery grid?

I have a theme with wpbakery page builder. I made a page to display blog posts using wpbakery grid. But I would like to display 5 posts per page and to use ajax pagination. I display 5 posts per page ...
1
vote
0answers
20 views

?cat=-1 Indexed Versions Of Homepage

I'm finding some strange query strings on my homepage are indexed in Google and causing duplicate content. A couple of examples: https://sciencetrends.com/page/103/?cat=-1 https://sciencetrends.com/?...
1
vote
0answers
69 views

Blog page pagination is not working after using the offset argument

I have displayed the recent 7 posts then shown the remaining posts. So I have added the offset = 7 in the argument to skip above 7 recent posts and display remaining posts but the pagination not ...
1
vote
1answer
23 views

Custom template Page 2 not working

When I click Next page, page-2 showing 404 error page. Page one is OKAY. I have created this custom post type with CPT UI plugin and building the theme from scratch. <?php /** * Template name:...
1
vote
1answer
34 views

How to use pagination on costum post type

i made a costum post type use plugin Costum post type UI and i tried to display i on homepage / index code <?php args1 = array( 'post_type' => 'app', 'posts_per_page' => 3 );$the_query1 = ...
1
vote
0answers
15 views

Randomised Post Time

I've imported a Drupal site to Wordpress with an archive of 1000s of posts which had been backdated by adding a custom taxonomy 'Year' rather than by adjusting the post date. I've been able to remove ...
1
vote
0answers
190 views

Calling & display certain product category loop and pagination on the homepage

Need some help with wordpress and woocommerce functions. OK, the situation is, I have a homepage that use archive-product.php template. It shows latest 28 products per page. This is the product loop ...
1
vote
0answers
83 views

Custom rewrite causes 404 on pagination

I have custom rewrite rules in place so that the posts page URL can be /blog/ and all posts have the URL structure /blog/post-title-here/, this works great, however I am getting a 404 error on the /...
1
vote
0answers
100 views

Why the pagination for a query modified by pre_get_posts doesn't mind the number & order of posts sorted & selected based on a custom date time field

I have the following task I'm trying to accomplish. I want to display events in the post post type. I want to sort them by date and time and there should be events only displayed happening right now ...
1
vote
0answers
17 views

WordPress paginate_links() function doesn't generate properly links after apply filters

I'm a junior WordPress developer. Apologies in advance for mistakes that prove foolish. I have an issue with my archive movie. Movie it is a custom post type. paginate_links() function works fine ...
1
vote
1answer
170 views

Two queries on the same page with pagination

I’m trying to put two queries on the same page with pagination. But the pagination of one interferes in the other. How can I do this with two independent pagination <div class="row list-group"> ...
1
vote
1answer
43 views

Why category.php throw 404 in wordpress while calling paginate_links()?

I am trying to develop my own Wordpress theme and want to add pagination in category page by call paginate_links() function. It will generate the links [1,2,... Next] perfectly but when I click on 2 ...
1
vote
0answers
24 views

How do you paginate a query grouped by month?

I am currently using David Gard's solution from the thread below. It works great as it fills the requirements of the OP. Basically grouping the custom posts by month and cap it at 6 months. Display ...
1
vote
0answers
34 views

How to handle paged param in post and custom-post-type?

hope someone can help me on my customization. PREMISES i'm very experienced dev, but very beginner on wp. I readed lot of answer on SO but not finding nothing similar to solve my issue. What i need ...
1
vote
0answers
458 views

posts_per_page not working for first page of pagination

I am displaying WordPress posts on my home page and using pagination for these posts. I am limiting number of posts (10) using posts_per_page. But still there are 90+ posts on first page but on all ...
1
vote
0answers
243 views

WordPress pagination not working on template search.php

I have a small issue, pagination doesn't work on search.php. I query the results with wp_Query using the code below, I get to see the page link but when I press them I get 404 error. I was told that ...
1
vote
1answer
195 views

Cutom wp_query for geolocation search, pagination not working

I have a custom search form that ends up on a page-template.php which then performs two WP_Query's. This is for a real estate where each property CPT has a long / lat value set via ACF. The code is ...
1
vote
1answer
381 views

Pagination links missing for first link (1) and previous button? How to get pagination links to work?

I'm trying to add pagination to my WordPress query using pagination_links() however I am getting no links returned for my page 1 links and previous link? Other links are adding the paged query string ...
1
vote
0answers
19 views

Plugin dropping pagination variable

I'm having problem with a plugin. In the plugin, I noticed the url string switches after the page load and the '&paged=#' disappears. For example: On page load: http://www.domain.com/wp-admin/...
1
vote
1answer
136 views

Taxonomy Pagination Rewrite

I have a custom post type named "testimonials" with a slug of reviews. I also have a taxonomy named "testimonial-department" with a slug of reviews. The goal being I will have pretty permalinks such ...