Questions tagged [pagination]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
667 views

Using the_posts_pagination with offset adds extra empty page

I'm working on a quite complex query, it has a different post count on the first page and on paginated pages, to achieve that I'm using offset and this seem to mess up the_posts_pagination. Here's ...
0
votes
0answers
26 views

Excluding posts without affecting the number of posts per page

I'm in a situation where I have to exclude certain posts dynamically using a complex set of conditions*. I'm currently using the_posts filter to remove posts that don't meet the condition. add_filter(...
0
votes
0answers
33 views

Content included from pagination

I appreciate if someone can help me to explain why my post content shows below the pagination even though I echo the title only. I call this code via shortcode. INPUT: // the query to set the ...
0
votes
1answer
464 views

Pagination on custom post type on front-page.php

I've seen several (and have tried at least 15+ methods here on StackExchange) ways of how to do the custom post type loop, none work in my case. I have tried methods using paged and without, using ...
1
vote
2answers
519 views

Paginate Pages by only showing 3 pages at most

I'm trying to use Wordpress paginate function to only show 3 pages at most(client wants it this way) so that when you go up a page it shows the current page you're on and the previous and next page: ...
0
votes
1answer
46 views

get_next_posts_page_link adds Inexistent directories

Using get_next_posts_page_link function to get url of paginated post's next page url, but it's adding directories to it that simply do not exist. Here is the code where I use it and probably missing ...
0
votes
1answer
88 views

How to add post page pagination to template part?

How can I get this page to display the post page pagination? I'm using a custom blog template with a get_template_part. https://www.nowitconnects.com/blog/ <?php /** * Template part for ...
0
votes
0answers
41 views

Adding pagination to Ajax Query

I have a search page. It works like this. (1) User searches using form in the homepage (2) User is taken to search results page (3) If user modifies the search term( there is form with in the search ...
0
votes
2answers
375 views

How can I change the output display of my pagination?

How can I change the output display of my pagination? I have been trying for the past few hours to format the output of my pagination links (1,2,3, etc.) to resemble the below: I have been unable to ...
0
votes
1answer
16 views

Why is my loop not populating the page with my custom taxonomy terms from my custom post type?

Why is my loop not populating the page with my custom taxonomy terms from my custom post type? Currently it is displaying an empty box instead of pulling in the custom taxonomy terms from my custom ...
0
votes
1answer
61 views

Generating rel=“prev” and rel=“next” using filters

In wp-includes\link-template.php the function which defines the pagination is: /** * Retrieves the previous posts page link. * * @since 2.7.0 * * @global int $paged * * @param string $label ...
2
votes
1answer
80 views

Wordpress Pagination not working, any ideas?

So I've been looking into why the pagination isn't working, but I just can't find anything. When it goes to page 2, it just shows the same as the first page. Any other ideas? <?php global $...
0
votes
0answers
293 views

How can I get my pagination loop to display the correct number of total pages?

Currently my pagination is showing 7 posts on the first page and 6 on each page after. This is what I want. The current readout looks like this: . The total count of my pages changes as soon as I ...
0
votes
1answer
116 views

Pagination for Custom WP_Query not displaying page 2 results

I know this question has been asked many times, and I've been trying every answer I came across all day from 11am-9pm and I am STUCK. Here is my search page http://tribute-software.com/development/?s=...
0
votes
1answer
191 views

Following/Followers Users list Using Ajax Pagination inside Author Profile

I will try to be clear, I'm using "Users Following System" plugin. And I added a list of the following/followers users into the author.php profile, now I'm trying to use Ajax pagination. For sure ...
0
votes
0answers
51 views

Search, pagination, the last pages leads to 404 page

sorry Im new to Wordpress. I have a search list and able to browse among hits: "http://example.com/search/SEARCHEDKEYWORD/page/11/" I have 15 pages, and the last 3 pages leads to 404 page. So, http://...
-1
votes
1answer
31 views

See the process of creating a taxonomy and tell me where I made a mistake

Now I will acquaint you with the process of creating a taxonomy and the appearance of an error in the pagination of posts for a certain category of created custom taxanomy. Step 1: Register custom ...
0
votes
2answers
2k views

Adding pagination to a custom archive template

I'm trying to add pagination to my archive template. If I use the same code as on my main blog template it doesn't filter results based on the tag in the URL, instead it simply shows all posts. ...
1
vote
1answer
47 views

How do I detect which page I'm on within a paginated post?

I'm using wp_link_pages() to paginate a post. I want to show something below the post content only on the first page of the post. Naturally I thought I'd use get_query_var('paged') to get the page ...
0
votes
2answers
105 views

Adding pagination to my theme [closed]

I would like to add a pagination to my wordpress theme. However, for me it is not so easy because my theme is built from the plugin "AT Posts Column", which displays the latest posts on the main page. ...
0
votes
0answers
499 views

WP admin ajax Pagination issue

Hello i am using ajax to filter my custom post type based on categories by ajax after ajax filter i am getting my desire result but after ajax call pagination not working. this is giving me this ...
0
votes
1answer
303 views

Injecting content with $wp_query->current_post restarts from zero on paged pages. How to inject content after X posts, regardless of pagination?

I am creating a shortcode that outputs a custom loop. Within the loop while, I am injecting certain content after a particular post count. This is done by checking the current_post number. This ...
-1
votes
1answer
32 views

Pagination not working in custom post type

I am new in wordpress, I want show pagination in custom post type query but pagination not show in frontend, can any one see my code where i am doing wrong: <?php // the query $paged = ( ...
1
vote
3answers
1k views

WP_Query ajax loader detect end of posts

I built the ajax loader as follows. How can I detect when it reaches the end of all posts? So that I can make the "More" button to disappear, or not clickable anymore. In page template: WP_Query ...
0
votes
1answer
27 views

User Archive page for Custom Post Type - Pagination Issue

I'm working on the author.php page and showing custom post types created by that user. Everything's working great except the pagination. Can anyone tell me what I'm doing wrong? Thanks! <?php ...
2
votes
0answers
40 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 ...
0
votes
2answers
552 views

Custom Post Type canonical link / pagination redirecting to root

I have inherited an existing site and have recently been asked to make some changes. They have 'renamed' the default post as 'latest-news' using this 'my_new_default_post_type': <?php add_action(...
0
votes
1answer
463 views

Override the WordPress default pagination markup

I want to render the WordPress posts pagination markup with my own HTML markup. My theme has a pagination markup with ul > li format. But the WordPress default pagination markup is different than ...
0
votes
2answers
21 views

How to display the pagination in my post list? [duplicate]

<?php $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; $args = array( 'posts_per_page' => 6, 'offset'=> 0, 'category' => 1, 'paged' => $paged ); $custom_query = ...
-1
votes
1answer
29 views

Can i know if it is Category first page or 5th?

Can i know with pre built wordpress function if it is category's first page or 55th page? For examle first page is mydomain.com/games/ and 5th page is mydomain.com/games/page/55/ CAn i determine it ...
0
votes
1answer
45 views

Page navigation doesn't seem to work when I add offset?

I am trying to get a simple navigation to work, it works when I don't use offset in the arguments. but I like to do something special with the first post $paged = ( get_query_var('paged') ) ? ...
0
votes
1answer
78 views

404 page on custom search pagination

I have to kinds of search forms in my sidebar. Both of this forms are handled in search.php page by an if/else statement and write a custom query for both of them. I also replace the default wordpress ...
0
votes
1answer
129 views

why pagination not working in page template

I make a page template, but when I click the pagination it doesn't work. <?php /** * Template Name: ashole * * @link https://codex.wordpress.org/Template_Hierarchy * @package Dan */ ...
1
vote
0answers
16 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 ...
0
votes
1answer
34 views

how to Adding pagination on template page wordpress

Below is my code with the template. I have included pagination but not working. <?php /* Template Name: bydate */ ?> <?php get_header(); ?> <div id="primary" class="content-...
1
vote
0answers
281 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
116 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
1k 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
131 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
46 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
164 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
19 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
190 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 ...
1
vote
1answer
270 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
14 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
43 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
76 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
95 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
49 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
3 4
5
6 7
34