Questions tagged [pagination]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
187 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
78 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 /...
4
votes
1answer
592 views

Next/Previous Links in same category

I've been pouring over this problem that seems really minor, but I can't seem to solve it. I'm trying to make next/previous links that only link to the category that the post is in. This is for a ...
0
votes
1answer
64 views

Pagination not working on homepage, On other pages it is working

Apologies if this is not the write place to post this question. Please suggest where i can ask such issues as being a not technical user. My website is www.gahney.com. Pagination is not working on ...
1
vote
1answer
38 views

Duplicating Table of Contents for Paginated Post

I have a technical blog with very long posts. I'm using pagination (via <!--nextpage-->) to separate the content into multiple pages. I manually add an html table of contents (TOC) on the top of ...
1
vote
0answers
97 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
91 views

Pagination for custom php code

This page (body only) is made completely in a custom php code, based on a custom type created by Pods module. I would like to know if there is any module that can help me insert a paging control ...
0
votes
0answers
13 views

Pagination in admin_post

I have a search form that works with ajax and extra information. I had to handle this form request with admin-post. Now this search query has pagination most of the time but as you might know, ...
1
vote
1answer
161 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"> ...
0
votes
1answer
13 views

Wordpress search page pagination displaying but not functional

I have a search page with pagination, that is displaying the correct number of pages, however it the links seem to be forwarding to the 404 page. $paged = ( get_query_var( 'paged' ) ) ? absint( ...
0
votes
0answers
34 views

Pagination with Metaboxes or Custom Fields

As you know we use <!--nextpage--> code to make pagination a post. Is there any chance to use this pagination with metaboxes or custom fields? I want this, because I want to add new ...
1
vote
1answer
19 views

How i can add 'N' page of 'N' pages under posts loop?

I want show number of current page and count of all pages, near my posts paginations. I am talking about this
0
votes
1answer
35 views

Tags pages for different Custom Post Types and WooCommerce Products sharing Post Tags

I have these post types : - Articles (blog), - Hotels (custom post type), - Products Activities (WooCommerce products with a product_cat Activities) - Products Transportation (WooCommerce products ...
2
votes
1answer
68 views

Any tag pagination page (except the 1st page) loads index.php template instead of tag.php

Created my first custom theme from scratch and I'm trying to do a listing of all posts with the same tag. In tag.php I display all posts with that specific tag via a WP_Query and I'm trying to ...
1
vote
1answer
41 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 ...
0
votes
1answer
692 views

Add <link rel=“next”> and <link rel=“prev”> in the header while looping over custom query in page template

I have a custom page template defined and working properly. On this specific page, I want to list a lot of links, and paginate them, to display 100 links per page. Here is the code in my template ...
0
votes
0answers
47 views

How can I get the last post while on the first post for pagination? As if it were infinite

The title might be a little bit confusing. So I'm trying to do the pagination for my posts and it's working fine, but I'd like to have it so that while I'm on the first post I can see the last post in ...
0
votes
0answers
47 views

Pagination is not working in custom page template

I have a pagination code that works fine in a custom post type pages single-category.php /* Template Name: categorie page Template Post Type: post */ but is not working in custom pages template '...
0
votes
1answer
22 views

Custom pagination in wp

I am new in Wp, can you please tell me ,is it possible to pagination like this design. Thanks in advance.
1
vote
0answers
23 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 ...
0
votes
1answer
78 views

Custom post pagination not working

I have a big problem with my custom post pagination on home.php page. It shows the first 4 post but when I go to the second page I get a page with only the header and footer but no news content and no ...
0
votes
0answers
106 views

How to insert content before pagination in loop?

I need to insert code for a banner ad below the last post on each page of the loop, but above the automatic WP pagination. Currently, inserting the code after the have_posts check displays it below ...
1
vote
1answer
27 views

How to get “last year from [spec year] that has posts”?

I have a year archive like this: ◀ 2010 - - - - - - - - - - - 2011 - - - - - - - - - - - 2012 ► And first I had the idea that a year with no posts would be just the same page with the ...
0
votes
1answer
64 views

Pagination for custom query returns 404

For a project I have created a custom post type called "episodes", which is registered like this. register_post_type( 'episodes', array( 'labels' => array( 'name' => __( 'Episodes' ), ...
0
votes
1answer
211 views

Pagination not working with pagenavi

I am using PageNavi and have been searching around trying to figure out why I can't get pagination to work. Currently, the page numbers show but when you click on the page numbers, it goes to a page ...
0
votes
0answers
258 views

Pagination on a underscore custom theme

I am trying to add a pagination feature on my blog page. The loop outputs the post grid fine but the pagination does not work and the Wordpress documentation does not work. I have no idea what going ...
0
votes
2answers
1k views

Disable pagination in posts and pages

I need to solve duplicating of posts and pages caused by unexpected paging. I am trying to disable the paging with this function, but it seems I miss something: function wpse_disable_pagination( $...
0
votes
1answer
109 views

Custom loop pagination issue ( pagination not showing up )

I have a pagination issue in my custom loop, here is the loop. <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args=array( 'post_type' => 'post', 'post_status' => '...
0
votes
1answer
154 views

Break up posts per page in two sections

I have a custom post type called 'videos' and I am using the Advanced Custom Fields plugin with a select field to use as a filter to assign where the post part will display on my page. I have two ...
1
vote
1answer
342 views

How do I fix this 'Undefined variable:' debug message?

The code below (which I use in functions) is from https://stackoverflow.com/questions/35263445/numeric-pagination-on-my-custom-category-page, and is showing a debug message of 'Undefined variable: ...
0
votes
1answer
30 views

Need help with Code Correction php+wordpress

I am not so good with PHP and I have a bunch of codes that also involves wordpress codes. I came up with these codes and it doesn't seem to work and I can't find a flaw since my knowledge on PHP and ...
1
vote
1answer
435 views

How to get the Page Number of the Current Page in Single Post Pagination

Let's say I have "Single Post" that is split by <!--nextpage--> pagination. And there are total of 50 Pages. So a user is browsing on that post and he is at page 25. I want the Post to Display ...
1
vote
1answer
129 views

Sorting Posts | Alphabetical Order

Let's say I have around 2700 posts (assuming 2600 posts starting with letters and 100 Posts starting with numbers. Also there are 100 posts for each letter and number. Like A, B, C, ... have 100 posts ...
0
votes
1answer
270 views

How can I get a paginated list of custom taxonomy tags with posts?

I have a cpt (item), in which each post is assigned a single custom taxonomy tag (item_tags). I want to list all tags, with description and linked titles of posts so-tagged. I've had previous help ...
0
votes
1answer
2k views

Ajax Filtering Pagination

I see this is a common problem, but I cannot find the solution. I have made ajax filtering when user click on checkbox. Everything is working until user click on pagination. Of course, we are then on ...
-1
votes
1answer
22 views

Wordpress Custom Theme: My site shows the same posts on Page 1 and Page 2 and so on [duplicate]

Despite the pagination going to nieuws/page/2, it still shows the same posts as on the first page. This is my PHP code for the blog: <!-- Tekst --> <div class="page-wrapper" id="nieuws"&...
0
votes
0answers
66 views

404 page not found on pagination in home page while navigating to next page

I am new to wordpress. I am trying to paginate custom post type I have created on index page. I can't figure out what I'm doing wrong . Here's the code : $paged = (get_query_var('paged')) ? ...
6
votes
3answers
586 views

How to get the number of Pages in a single Post Pagination?

Is there a way to query the number of pages/the last page of a single post which is paginated by <!--nextpage--> on wordpress? function count_post_pages($post_id) { $the_post = get_post($...
-1
votes
1answer
110 views

Custom post type pagination problem - page 1 and 2 show same content

I have a custom post type for frequently asked questions, called Question. Its archive is at /faq/. Page 1 and 2 of the archive currently show the same content. I did some digging and on page 1, ...
0
votes
0answers
20 views

Wordpress Single Post Pagination Numbered and Navigational

I already have a Pagination on my Post [Single Post Pagination using <!--nextpage--> ] and it looks something like this... Now, I want to change it to... I have gone through few documentations ...
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 ...
0
votes
0answers
63 views

The pagination is working on Local, not on LIVE. why?

Here is the code for pagination: function numeric_posts_nav() { if( is_singular() ) return; global $wp_query; /** Stop execution if there's only 1 page */ if( $wp_query-&...
0
votes
1answer
73 views

Wordpress multiple loops with default pagination

I'm trying to list advertisers in 3 categories (custom taxonomy "ad_category") as basic, casual and premium. As default query one page contains 10 results but it should be in order to display premium ...
0
votes
1answer
105 views

Exclude a category slug on pagination

I'm a beginner of wordpress ... I'm creating my first template and I would like to exclude the category "portfolio" from pagination. I tried in every way, but I managed to do just the opposite, browse ...
0
votes
2answers
180 views

Custom loop pagination links not working

I'm bringing up an issue that could not be solved after googling for solutions over a few days. The goal I have to meet is to output a pagination for a custom post type named office-magazines with ...
0
votes
0answers
266 views

Page not found after clicking on pagination

I'm using this code to display page pagination on my website. But when I click to go to the second page it shows me "Page not found" error. Does someone know what is wrong with my code that is not ...
0
votes
2answers
2k views

Pagination (page/2/) displaying 404 on archive pages

I have a custom WP_Query inside of an archive. I know this is not ideal, but when I try switching it out for a pre_get_posts option, then my page just enters an infinite loop, so I'd rather stick with ...
0
votes
1answer
565 views

Custom query vars filters problem with pagination

I have multiple custom query vars to filter products with the pre_get_posts hook and the add_query_arg function. All works fine except the pagination, when i navigate to the page number 5 (for ...
0
votes
1answer
66 views

CPT/Taxonomy/Postname permalink structure makes pagination break

I've defined this permalink structure custom-post-type/taxonomy/post-name It all works like a charm, except when it comes to pagination. When I move to page 2, it loads a post instead of the second ...