Questions tagged [pagination]
Breaking up content into smaller-sized pages to be viewed individually
1,824
questions
0
votes
1
answer
109
views
Why does my WP_Query pagination on a custom page.php only loads the homepage?
What I am looking to do:
Setup WP_Query pagination in a custom php template file with a custom WP_Query query (It's not originally mine, I'm just fixing it). The file loops through posts (category &...
0
votes
0
answers
290
views
How do I get pagination for get_posts() in WordPress or do I have to rewrite the whole code?
I inhertited a WordPress page with a long post list on one page that uses get_posts(). I need it to have pagination to not load all the posts (images, content) at once. Would I have to rewrite ...
0
votes
1
answer
22
views
how to skip a CPT element from the pager by custom field
I'm making a template that shows all the users of a CPT Family like this:
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : ?>
<?php the_post(); ?>
$...
0
votes
0
answers
143
views
duplicated posts when using pagination
This is my query, it's so simple (the query is generated by canvas plugin)
ps: the $page has correct value
$query_var = [
'post_type' => 'new',
'orderby' => 'date',
'order' => 'DESC',
'paged' ...
1
vote
0
answers
17
views
Wordpress Pagination changes my template
I have a problem using pagination for terms in my custom taxonomy, let's call it Case-Studies.
If i go to /insights/page/2, posts will be displayed correctly, and I can navigate between pages.
The ...
0
votes
1
answer
31
views
Rewrite with pagination /foo/page/2/ to posts of a given category, page 2
This
add_action('init', function() {
add_rewrite_rule('^foo', 'index.php?category_name=category1', 'top');
});
works and allows example.com/foo/ to display all the posts from category1.
But then ...
0
votes
1
answer
390
views
search with pagination not working as expected
Why is this url pattern taking me to a 404 page where i saw in some other sites this same pattern works fine with search and paginate please help me i am new to wordpress and don't know why this is ...
1
vote
0
answers
486
views
wp_query 's', search filter with pagination is not working
I made this shortcode for a page of posts.
I want to set a search function.
I filled for example: "web design".
The search-result will set in the var "$catSearched". Then it works ...
0
votes
0
answers
334
views
wordpress pagination wont render on custom page template even though its right under the loop like the documentation says so
In Wordpress how do you get pagination to render on a custom page template?
https://developer.wordpress.org/themes/functionality/pagination/
Examples #Examples
Loop with Pagination #Loop with ...
0
votes
2
answers
1k
views
WooCommerce pagination: remove 'page' from url
I want to change WooCommerce pagination links from:
example.com/category/page/3/ to:
example.com/category/3/
I found many examples of how to change '/page/' to '/something/' but I want only the ...
0
votes
1
answer
2k
views
the_posts_pagination() not working in wpquery
I'm trying to create pagination to the custom wp_query here is my code:
<?php
$btpgid=get_queried_object_id();
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = ...
0
votes
1
answer
328
views
Pagination of custom page with custom fields query
Hello I have created a custom php file that I use to show specific posts by value inside the a custom field. So for example I have 100 posts, let's say they all have custom field MyTitle and 10 of ...
0
votes
0
answers
14
views
Pagination not give another posts
i make it a custom page blog with 4 post per page but when i want to change the page, i get same posts from the first page. This is how is look my code
`
<?php
$paged = (get_query_var('paged')) ? ...
0
votes
0
answers
35
views
How is the Page Splitting implemented in the theme?
I am studying how the page splitting is implemented, after inserting in the post.
Currently in my theme, all split pages will show the content of the first page. So I think the issue comes from the ...
0
votes
0
answers
241
views
Why the page number does not appear in splitting post?
I just follow the instructions in https://www.wpbeginner.com/wp-tutorials/how-to-split-wordpress-posts-into-multiple-pages/#without-plugin to split a large post into several pages. However, after ...
0
votes
1
answer
370
views
Pagination on and tag.php not working
I have added tags to a custom post type, on its $args array using 'taxonomies' => array('post_tag'). Im using the following code on tag.php to loop posts from a certain tag. It works well but ...
0
votes
0
answers
205
views
How to Add Pagination to Page?
I follow the instructions in https://www.wpbeginner.com/wp-tutorials/how-to-split-wordpress-posts-into-multiple-pages/ to add <!––nextpage––> tag to my page in classic editor, see below:
...
0
votes
1
answer
314
views
Pagination contents not changing in Front page WordPress
This question has asked many time before and none has answers my question. I went through most of the answers before post this.
I have a pagination query in home page. Pagination is showing and I can ...
0
votes
0
answers
578
views
Load more posts using AJAX based on posts inside WP_Query
So this is something that I have been battling with for some time now and I can't figure out how to "Load More" posts using AJAX with a combined query.
Is it possible to AJAX Load more with ...
1
vote
0
answers
316
views
Add icons in paginate_links()
I have added the following in my woocommerce pagination
<?php
echo paginate_links( apply_filters( 'woocommerce_pagination_args', array(
'base' => $base,...
1
vote
2
answers
619
views
Pagination of a WP_Query Loop in a child-page page template
See edit at bottom.
I have a wp_query loop in a page template for a custom post type ("success_stories"). The loop itself works fine but I cannot seem to get pagination working. I've tried ...
0
votes
1
answer
342
views
How to remove url from omission dots in WordPress pagination?
I am creating a custom pagination with my WordPress. Everything is fine, despite the omission dots are linked to too.
So it creates an anchor with http:/localhost/wordpress/page/....
How can I get to ...
0
votes
0
answers
69
views
Custom post type paging return home page
I am having problem with Custom post type paging. Clicking on 2nd page of paging through back to home page. Permalinks flush/refreshed and i am using simple code to show custom post.
following is my ...
0
votes
2
answers
91
views
Use of rewind_posts() cause pagination to break
I'm developing a site using Understrap's starter theme. I wanted to use a split design on home.php where the latest post is displayed on top of the others "full width" while the rest are ...
0
votes
0
answers
587
views
Pagination in woocommerce - Limiting page-numbers
The below code is displaying pagination as follows - 1 2 3...6 7 8 9 >
Whereas I just want to display - 1 2...8 9 >
Basically I just don't want the pagination to be more than a line if I have ...
0
votes
0
answers
20
views
template with multiple post loops for multiple widgets [duplicate]
I have two different widgets on one of my pages. They both display posts, but from different categories. One widget has pagination. Now when I switch to another page, the 2nd widget doesn't display ...
0
votes
0
answers
47
views
Comments pagination: reverse JUST the links texts (1-2-3 to 3-2-1), not comments order
Hi fellow Code Poets )
I wanted the pagination links numbers to be in the order opposite to the pages they lead to. The link leading to the last page had to read 1, and vice versa, etc. I've written ...
1
vote
0
answers
304
views
Help with Elementor Pagination CPT archive 404 problem
The pagination links in CPT archive created with Elementor Pro get a 404.
I've spend a full day searching and trying everything I found on Google with search "CPT Elementor archive pagination 404&...
0
votes
1
answer
243
views
Blog posts pagination not working
I have been debugging this but I cannot seem to find what's wrong. An extra eye would help!
I am trying to add pagination on my blog posts. Here is the code
On home.php
<?php
$total_pages = $...
0
votes
1
answer
35
views
Keeping session instance of random display results over pagination breaks
I'm working on a site that has blog posts with performers' info under a single category that can be filtered using a custom taxonomy (both parent and child terms). To keep it as fair as possible, the ...
0
votes
1
answer
367
views
Custom wp_link_pages for paginated posts | Next page randomly
Does anyone know if it's possible to change wp_link_pages,
I want to change the order of the pages
Example :
i have an Post consisting of 5 pages
i want when you click on "Next page", it ...
0
votes
1
answer
68
views
Wordpress post pagination continuous [duplicate]
I have these shortcodes which I am using as links in my front end to get the next post and previous post.
When I get to the last post it just keeps reloading the last post again. How can I get it to ...
1
vote
1
answer
2k
views
WP Pagination on Posts Search Results Page resulting from AJAX WP Query
I have a simple WP post query, which is supposed to load 8 posts per page, with a post navigation displayed below, like so:
$query_args = [
"post_type" => "post",
"...
0
votes
2
answers
586
views
Disable and redirect pagination of Home
My home is a static page, but Wordpress create enumeration "home/page/2/.../3/" and the only solution found that disable pages generation, also redirecting, is the instruction below, but I ...
0
votes
1
answer
49
views
Pagination not working on archive.php
I am using the WP Job Manager plugin and was able to point where the markup of http://www.mywebsite.com/job-listings/ is used. It's set on a file called archive.php of my main theme.
<div id="...
0
votes
0
answers
26
views
Pagination not working in custom post type but perfectly in posts
<div class="pagination my-3">
<?php
global $wp_query;
$big = 999999999; // need an unlikely integer
echo paginate_links(array(
'base' => str_replace($...
0
votes
1
answer
63
views
WordPress static home page pagination not working
I am trying to add the pagination on the home page, But it is not working. Can anyone help me to fix the issue?
<ul class="xl-products grid- masonry">
<?php
if(...
0
votes
1
answer
306
views
pre_get_posts pagination not working
I've been trying to fix my pagination on for category pages but am at a loss.
This is my pre_get_posts function for category pages.
add_action( 'pre_get_posts', function ( $q )
{
if ( !is_admin() /...
0
votes
0
answers
48
views
How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
The Setup
I have divided my blog into 3 categories with their respective slugs. There are 3 pages corresponding to these 3 categories with their respective custom page templates. On each page, I ...
2
votes
1
answer
307
views
Redirect "any page/page/number/" to "any page"
I've read so many similar topics but none of them matches my own request.
I'd like to redirect in ht.access any page with pagination to the root-main-original page.
example.com/garden/page/2
...
0
votes
1
answer
76
views
custom posts archive pagination links /page/2/ ends up in 404
I have a custom post named blog, I am using a page with url - slug blog, with custom template for displaying the blog arhive.
This is the query I am using in the template file:
global $wp_query;
...
3
votes
2
answers
214
views
How to get post pagination like this
I'm using this function right now
wp_link_pages( array('before' => '<div class="page-links">','after' => '</div>',) );
The post pagination is showing like this:
1 2 3 4 ...
1
vote
0
answers
430
views
Limit the number of acf content when displaying in post loop [closed]
I display post images by this way in the loop .
<?php
$images = get_field('POST-IMAGES');
$size = 'medium'; // (thumbnail, medium, large, full or custom size)
if( $images ): ?>
<ul>
...
1
vote
0
answers
51
views
How do I move/order posts with a tag to the end?
Let's talk about the situation first.
I have a query for finalists, some of which has a tag 'Special Mention'.
I need to move all posts with the tag to the end of loop.
e.g. I have 13 posts, 3 of ...
1
vote
0
answers
162
views
Pagination Broken on Static Pages but Works on Blog Articles
Our live site has a staging site.
All plugins have been updated to the most recent version on the live site.
The plugins have not been updated on the staging site.
The website does not have a plugin ...
0
votes
1
answer
31
views
Whole site's pagination not working after rewriting product permalink
I have to rewrite the product's permalink by changing it from the default /product/product-name into /%product-cat%/product-name. %product-cat% is a custom category. But after I rewrite it, the ...
1
vote
0
answers
636
views
pagination with 'no_found_rows' => true,
I have 100000 records in my database and so many meta query performed on it so it takes lot of time to perform the operation, have checked few articles and using them it suggest disable no_rows_found ...
0
votes
1
answer
41
views
Wordpress pagination URL
How to get a similar kind of pagination URL in Wordpress?
In both the URL you can see 'Faculty' which you cannot achieve in default Wordpress I guess.
Listing page:
https://engineering.jhu.edu/...
0
votes
1
answer
180
views
Pagination not working in custom post type. Help
I am currently working on an eCommerce project where I am coding a non-WooCommerce dependent theme for eCommerce. The current problem with me is, I am coding archive-product.php which is a custom post ...
1
vote
0
answers
103
views
Change search results order for Admin -> Appearance -> Menus -> Pages -> View all
I have over 200+ pages (about 100 for each of my two languages).
How I can change the order of results? I need the same as on the page with Page list.
On the Page list e.g. you have a parent page and ...