Questions tagged [pagination]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
25 views

Add pagination to custom search

So I took over a site, and the problem being that I would like to add the pagination to the custom search made by the former developers. I have a little trouble to find my way around and I would have ...
0
votes
1answer
2k views

Search not showing all results

EDIT: So I've done some troubleshooting and it seems my theme isn't showing woocommerce search results. The 2017 theme does so I am trying to figure out what my theme is missing. I suspect something ...
0
votes
1answer
1k views

Pagination for user list

I am showing all the users by using the get_user() function. But I need to paginate the results. I tried a lot, but didn't succeed. Here is the code, which doesn't work as expected: $args = array( '...
1
vote
2answers
2k views

Archive pagination not working

I am trying to add pagination for my Archive. I want to show 12 posts per page and then show the 'next' / 'previous' buttons. When I manually change the value of the $paged variable, the 1 into a 2 ...
0
votes
2answers
1k views

the_posts_navigation is not working

Unfortunately, the_posts_navigation() function is not working for me. When I click on 'Older Posts' it's showing '404 page I don't know why my code is not working. Here is the code - <div class=...
0
votes
1answer
1k views

Pagination url for page template

I am creating a page template in WordPress to show all my posts. But i have a problem with pagination. I have a page url like below: http://localhost/sdd/video "video" is my page slug. And the ...
1
vote
1answer
73 views

Not able to rewrite the pagination URL for the posts

My posts pagination in not working in WordPress 5.5 and So, I want to rewrite the URL for the pagination. I am using posts with pagination in the inner page with slug "post". Current URL (...
0
votes
1answer
2k views

How to list custom post types on a custom post type page?

I would like to know why my custom post type pages do not accept paged pages? On a normal page I can list custom post types without problems, but on a custom post type page, it seems impossible. I ...
1
vote
1answer
591 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 ...
0
votes
0answers
22 views

Custom posts per page on first page generates wrong number of pagination links

I've looked at every solution I could find, but everything I've tried seem to have this same issue (although nobody has mentioned it). I have a custom taxonomy with 30 posts in it. Global ppp is 9, ...
0
votes
0answers
57 views

add pagination in wordpress page template

I am using custom page to display my taxonomy terms the terms are displaying fine but i dont want the terms to all show in one page i want 2 terms per page but the pagination is not working and its ...
0
votes
1answer
2k views

Woocommerce pagination not working in custom loop WP_Query

Please help with pagination I have code that works fine (functions.php) function projects_custom_number_of_posts( $query ) { $query->set( 'posts_per_page', 2 ); return; } add_action( '...
2
votes
5answers
1k views

A way to detect which page a post is on

I'm wondering if there is a good way to tell which archive page a post came from. I essentially just need the post's position in the total order, then divide it by the 'posts_per_page' option. The ...
0
votes
1answer
3k views

Using WP_List_Table and search_box(): How to Paginate the Found Search Results When Sending by Method «Post»?

I am using a custom WP_List_Table-Class in order to display a custom table with hotels in the dashboard. I can skip through the pages with the pagination on the top right as expected. The search form ...
0
votes
2answers
701 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
568 views

How to use pre_get_posts to alter posts_per_page of category pages, where 'posts_per_page' will be dynamic

I have Category templates with custom fields in Edit Category page of WordPress. One custom field there is to put How many posts per page to show in the category page. I am using pre_get_posts to ...
0
votes
0answers
18 views

Custom Category Pagination shows countless blank (empty) pages

I have a category that consists of 14 pages. But there is a problem. Once you reach /page/14/, you can open blank pages 15, 16, 17, 20, 100, 200 and so on. I would like after page 14, visitors to be ...
0
votes
3answers
2k views

Pagination of custom post type leads to 404 error

This seems to be common issue, and there exist a lot of posts about this issue but none of them works for me. I have a custom post type (portfolio) with a page pagination. $paged = (get_query_var('...
9
votes
4answers
31k views

Display posts from the same category using next/previous post link

I am using this code, but once I click on the next post/previous post link, I am redirected to the next post/previous post of a different category. previous_post_link( '%link', 'Prev post in ...
12
votes
11answers
47k views

WordPress /page/2 404 pagination problem - what to do?

I came across the /page/2 404 pagination problem and tried to find a solution. I've read some suggestions, but it didn't help yet. Working: http://pandasnacozinha.com.br/bolos-doces-e-sobremesas/ ...
0
votes
1answer
1k views

Custom post type archive pagination with HTML5Blank theme?

Can't get the pagination to work. Here's my archive-work.php: <?php get_header(); ?> <main role="main"> <!-- section --> <section> <h1>&...
19
votes
3answers
7k views

WP_Query Pagination on single-custom.php

What I am looking to do: Setup WP_Query pagination in a single-custom-post-type.php template file What I have done 1) Created a post type called "authors". Each post within that post type is an ...
1
vote
1answer
243 views

Pagination Not Working on `WP_Query` Archive Page

I have an archive page that pulls two different custom post types into an archive using WP_Query(). Because there is a home page to the site which shows 9 of the custom post type posts, I offset the ...
5
votes
1answer
7k views

How to paginate the get_users function?

Im using the get_users function to show a custom list of users on the site. The only issue Im having a problem figuring out now is how to paginate the result. This is a sample of the function that Im ...
0
votes
1answer
142 views

Pagination Not Working When Used With WP_Query() `offset` Property

I have an archive page that pulls in posts using WP_Query(). On the homepage of the site it shows 16 of the custom post type posts, so on the archive I offset the archive page by 16 posts. The code ...
0
votes
0answers
18 views

How to use Load more button ajax in wordpress for post

I'm trying to display a click event for displaying the posts list in WordPress. I've used my template file for this code. template loadmore.php <?php /** * Template Name: Ajax pagination Template ...
1
vote
2answers
2k views

Archive Page for Custom Post Type is not Working

I have registered a custom post type "tutorials" with the following snippet. <?php /* Template Name: Tutorial Archive */ get_header(); ?> <div id="content"> <div class="...
0
votes
1answer
2k views

Pagination in custom post type page template

I made a query for my custom post type "websites". I'm trying to get the pagination working but I'm running in some errors. I think the whole code is ok, only the part just before the end while tags. ...
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 ...
1
vote
0answers
27 views

Custom taxonomy rewrite give pagination 404

I have a Custom taxonomy with this rewrite: 'rewrite' => array( 'slug' => '/', 'with_front' => false), So every term will look like this: https://example.com/term/ the problem with the ...
1
vote
4answers
516 views

Pagination is not working in custom post type

I want to add pagination in single page of custom post type. This is the code for single page (custom post type): <?php $paged = get_query_var('paged') ? get_query_var('paged') : 1; $args ...
0
votes
2answers
529 views

How to add pagination to a post loop in a custom BuddyPress tab

I created a new tab called "Videos" inside of the BuddyPress Profile page. This tab contains all video posts added by that user. The problem is that it only shows the first 12 posts and the pagination ...
0
votes
1answer
527 views

Pagination on custom post types

Pagination works in the front page but in custom post type page it doesn't appear. Post type: add_action('init', 'portfolio_register'); function portfolio_register() { $args = array( ...
0
votes
1answer
109 views

Pagination custom post type not working with rewrite slug

I can't find the way of making my pagination to work on my post type (this is not on an archive-posttype.php). I've rewrited my post type, but the second page isn't working if I do the rewriting (&...
1
vote
1answer
651 views

Pagination in plugin's backend

I am displaying a list of posts in the plugin backend but I can't seem to get the pagination to work. I used the standard approach of getting the "paged" variable and then passing it to get_posts()'s ...
2
votes
1answer
917 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....
0
votes
0answers
23 views

Woocommerce paging incorrect url

I have a problem happening with the paging on a page, which is using the woocommerce plugin. Locally the paging works fine, and the 2nd page button(or the next arrow) points to: somePage/somePage/page/...
0
votes
0answers
12 views

wp_link_pages this function can't display pagination

I use this function wp_link_pages(); and it can't display pagination, in my theme the pagination displays the same product. Can anyone help?
2
votes
1answer
36 views

In pagination, change link for page 1 to homepage

I have a problem, when I am on page 2 or on any other page and I want to return to the index, the url that offers me the pagination on page 1 is the following (https://www.url.com/page/1) and I would ...
0
votes
1answer
611 views

offset and max_num_pages in pagination gallery

I rewrote the code galleries and stopped at the pagination. How can I get the maximum number of pages? at the moment I can not define it, and put a test for the number 5. (Here "for ($ i = 1; $ i &...
0
votes
0answers
27 views

static page pagination not working

I have a static home page on my Wordpress blog and I cannot seem to figure this out. I want to be able to navigate between different pages in my blog via the pagination. I changed 'paged' to 'page' as ...
2
votes
3answers
18k views

Numeric pagination custom post type

i create a custom page to display loop of cpt with custom field. I need to add a numberic pagination and i try with this code but not work. Functions.php function pagination_bar() { global $...
0
votes
1answer
601 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 ...
1
vote
2answers
33 views

pagination with numbers for WP_User_Query

I have pagination with next/previous links but I also would like to show numbers so the user can click on 2, 3, 4 etc. Pagination seems more tricky with WP_User_Query as there isn't any default ...
0
votes
1answer
672 views

How to limit page pagination… again

I'm digging out on old question as no solution came out. How to limit page pagination I'm looking for a way to limit pages on homepage and categories (archive.php). I have around 200k posts spread ...
0
votes
1answer
617 views

Reverse ordered pagination on home page

Use on the blog reverse pagination. The question arose. How to make a home page is not the first? Need to break the link Home = First page and make a connection Home = Last page. Home should be the ...
0
votes
2answers
971 views

Wordpress pagination not returning posts on second page

I've got a page where I only want to display one post per page with pagination at the bottom to go to the next/ previous post. This is my code: <?php $paged = ( get_query_var( 'paged' ) ) ? ...
1
vote
2answers
38 views

Wpdb result with pagination

i got this function and its working properly without pagination, but right now i need some pagination on page as a listing is grow up now, how can i do that? function listing_items($args){ global $...
1
vote
1answer
26 views

Next and Previous Posts of Same Parent

I'm working on a website for a webcomic and I have a custom post type set up for comic pages. I have multiple series on the site and have made each comic page a child post of a parent (one parent for ...
0
votes
1answer
43 views

How to add numbers pagination to this blog page?

I want to add number pagination to my blog page. I have tried to add pagination code but it does not appear. here is the code and I want to add numbers pagination to it. it is blog page <?php ...

1
2
3 4 5
35