Questions tagged [pagination]

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

Filter by
Sorted by
Tagged with
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 = ...
0
votes
0answers
42 views

PageNavi redirects to 404 when used as archive page

I'm using a page as archive for a custom post type called event. register_post_type('event', array( 'labels' => array( 'name' => 'Événements', 'singular_name' => '...
0
votes
1answer
206 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
22 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
53 views

How to add Pagination on post_type attachment?

I have a WordPress page that displays all attachments attached to a post instead of the post itself and I want to add paginations to it. The problem is that the pagination only appears if I change ...
0
votes
0answers
27 views

More pages avaible than max number in pagiantion

I found out that my pagination display for example max 2 pages but I can freely go to (max) 5, changing the number in the url address. It' avaible until I change the value to 6 or more, then I got 404....
0
votes
0answers
30 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
0answers
27 views

Same content on Wordpress - Pagination with custom query

I am making own template for WP and I have problem with pagination. The content is always the same on every page. I read many pages about this problem and I implement the solution, but it doesn't ...
0
votes
0answers
45 views

How to modify the code to include “rel=next” and “rel=prev” tags?

I have a Wordpress site with some posts splitted in pages. I added post pagination via this code: Single.php: <?php wp_link_pages(array( 'before' => '<div class="page-links"><span ...
0
votes
0answers
21 views

I am unable to Split my Long Post using <!--nextpage--> Code

Whenever I enter the command <!--nextpage--> in html, it just breaks my post and does not show next or 1,2,3 pages to go for next broken page. I have already tried to add this code <?php ...
0
votes
1answer
208 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 ...
0
votes
0answers
24 views

Create custom design for posts loop with pagination

I need to create a simple posts loop to be shown on the homepage (Meaning - I am in "page" and not "blog" or "archive" This is what I need: Display maximum of 5 posts there will be arrows on both ...
0
votes
0answers
27 views

Custom archive paged head title

My website is in hebrew and when im in a paged archive the title is "archive title" page 2 of 4. How can i add the title only in archives that are in a page 2 or higher? I am using Yoast SEO. And its ...
0
votes
0answers
183 views

Woocommerce 'order_by' random with 1 hour seed refresh

I need my woocommerce products to display randomly. My products are actually people and the random element is so different people get seen on the first page so no-one is favoured. So, I have ...
1
vote
2answers
173 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
32 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
38 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
85 views

How to paginate across foreach loop?

I want to paginate a lengthy page, but it is not about paginating a post loop. My site has thousands of posts of type "article". And taxonomies including "company" and "format" - an "article" can be ...
0
votes
0answers
35 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
65 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
0answers
15 views

Pagination on Search Query not formatted correctly

I have in my pagination code below I have seemed to figured out how to omit the /page/1/ from the first link of my pagination like this 'base' => get_pagenum_link(1) . '%_%', on news posts and ...
0
votes
1answer
35 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
67 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
125 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
77 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
136 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
40 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
0answers
24 views

paginate_links pagination with new variable pg

I would like to add new parameter "pg" as page number with help of paginate_links(). My website: https://www.dealfinder.lk/search/?deal=happy-hour&pg=2 Here is my function : echo ...
0
votes
2answers
560 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
28 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
68 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
200 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
0answers
76 views

List tags and pagination

I have a custom template page where I display all TAGS used in the site. In my case I use them to show the author name. The way I display them is... <ul> <?php $tags = get_tags()...
0
votes
0answers
26 views

Why does page/2 return 404 in authors.php?

I have a WordPress website. I have two user roles. one is "author" and another is "team_member(which is created using user role editor plugin)". Now pagination is working fine for the role("authors") ...
0
votes
1answer
144 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
26 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
742 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
25 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
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 ...
0
votes
2answers
321 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
198 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
17 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
26 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
24 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
58 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
87 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 */ ...
0
votes
0answers
18 views

custom pagination gives 404 page

I am working on custom pagination in custom post type in wordpress. the code I have used in function.php function custom_pagination($numpages = '', $pagerange = '', $paged='') { if (empty($...
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 ...