Questions tagged [pagination]

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

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

Wordpress blog pagination not working

Please let me know if anyone know .. <?php $per_page = 6; $paged = get_query_var('paged') ? : 1; $offset = (1 === $paged) ? 0 : (($paged - ...
0
votes
0answers
18 views

How to make a pagination with dropdown selection?

This is the code for the dropdown pagination. It uses a js controller too, but it works fine, so, I’m not adding it. $total = $wp_query->max_num_pages; // only bother with the rest if we have more ...
0
votes
0answers
17 views

Wordpress pagination broken for page 2,3 with custom permalink. Redirects to baseurl

I have a forum installed with my Wordpress site. My pagination does not work and redirects pages 2,3, or more to baseurl when they are on homepage. Here are the settings: Forum baseurl: https://...
0
votes
0answers
15 views

Pagination for list users with get_users

I need to finalize a page template that presents an author to shortcode. That works well. But I am struggling to paginate my list. I looked at the WP doc and the tutorials, they are quite different ...
0
votes
0answers
16 views

Pagination counter like < 1/2 >

I am learning to develop in wordpress. I want to create a custom pagination, with a counter like function to display my blog posts. This is how I want it to look like: This how it should function: ...
0
votes
0answers
10 views

how to display next previous pagination on custom page?

I tried to add pagination my custom page, the pagination number appears but there is no next and previous pagination. function.php function pagination($pages = '', $range = 4) { $showitems = ($range ...
0
votes
0answers
21 views

White screen of death on index.php page 3 and above?

I am experimenting with custom loops and following the tutorial of the illustrious Chip Bennett, and I actually got everything to work on index.php! ... Up to, that is, page 3. Everything works lovely ...
0
votes
0answers
10 views

using custom paged variable in get_previous_posts_link() function

Is there any way to use a custom paged variable in get_previous_posts_link function? I have two different custom loop on one page and need to have two different and independent pagination for these ...
0
votes
0answers
12 views

WordPress pagination problem on merged queries

I have merged queries in search.php with custom post types. This is my scenario when user search to "math", the main query is searching in the post title, post excerpt, and post content. Now ...
0
votes
0answers
13 views

WP_query pagination on frontpage

I'm trying to make a pagination for a WP_Query on a frontpage using the paginate_links() function and following the codex (https://codex.wordpress.org/Pagination#Static_Front_Page). The pagination ...
0
votes
0answers
7 views

Post pagination links ordered by meta value

Is there a way to order the nex-previous post links, or any other pagination function to get the links ordered by meta value, like I have done in the posts listing page shown below? $events = ...
0
votes
0answers
23 views

Custom pagination with URL parameters

I want to use URL parameters to define pagination pages like this /blogroll/?page=1, /blogroll/?page=2, /blogroll/?page=n.. instead of the conventional Wordpress way /blogroll/page/2/ In the same time,...
0
votes
1answer
19 views

Wordpress /page/2 gives 404 when custom permalinks is set to %category%%postname%

My wordpress permalink settings, Custom Structure: %category%%postname%. Used next_posts_link() in custom theme in archive.php to get next posts link. Result: Next Page >> (display as expected) ...
0
votes
0answers
18 views

sticky posts and pagination issue

Why is this query repeating sticky posts on the second page? Also, the first page does not contain only sticky posts. Note: number of sticky posts is 30 and I want the firstpage to show only stick ...
0
votes
0answers
17 views

How to get rest api pagination headers via fetch

I'm creating a react app via create-react-app. My application is very simple, I just want to fetch posts and display the images and the post title. I can't seem to be able to get the pagination ...
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
0answers
21 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
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 ...
1
vote
1answer
168 views

Wordpress 5.5 breaks pagination in an older plugin

I am stuck having to use an older plugin, which is no longer maintained. The problem i'm facing is that in WordPress 5.5, the pagination that plugin uses, breaks. All you see is the first page. This ...
1
vote
1answer
71 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
135 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
0answers
26 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 ...
0
votes
1answer
106 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 (&...
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?
0
votes
0answers
25 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
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 ...
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 ...
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
25 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
32 views

Include a leading zero in pagination

I'm new to WordPress Development and have been teaching myself over the last few months how to develop a theme from scratch. Normally I can figure issues out on my own through forums, but I can't ...
0
votes
0answers
18 views

Pagination on author.php page with custom var

I have a WP_Query on the author.php page that queries a users favorite posts stored in custom metadata. $author = get_user_by( 'slug', get_query_var( 'author_name' ) ); $author_id = $author->ID; $...
0
votes
1answer
42 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 ...
0
votes
0answers
29 views

Create pagination foreach loop

I have this foreach loop on a page how can I create pagination links for posts $args = array( 'numberposts' => 4, ); $catPosts = get_posts( $args ); foreach( $catPosts as $...
0
votes
0answers
17 views

Pagination for custom categories template

I'm a newbie with wordpress theme creation. I want to create a custom category.php file, I've implemented the loop and it will display the last 8 posts. I have some fake posts to test if all works ...
0
votes
0answers
13 views

How to paginate comments with wp_list_comments

How to paginate comments using 'per_page' and 'page' arguments, some how like 'paged' argument for WP_QUERY works. I want to list comments passing arguments somehow this way: $curr = max( 1, ...
0
votes
0answers
19 views

PAIN. Comments Pagination

Sorry for flame, but i wasted 7-12 hours trying to understand how comments pagination works.... Never thought that simple step will take that much with WordPress :'(((( i output comments in my theme ...
1
vote
1answer
48 views

How to get an array of years from all of the search results, and use it to filter by year the paginated loop?

I hope this is not too dumb: even though I'm learning at an acceptable rate, my WP knowledge still has some important gaps. What do I have: My search.php template gets its results from the normal ...
0
votes
1answer
50 views

Show number of pagination pages even when total under two

I have implemented pagination to my wp site and pagination works correctly, but when I limit to display lets say 10 posts and I have 9 then it won't show pagination. Is it possible to show in that ...
0
votes
1answer
72 views

Pagination Not Working for Custom Taxonomy with Custom Query - 404 Error

I am having trouble getting pagination working for custom taxonomy archive with the custom query. The pagination on the taxonomy archive ends up with a 404 page. I have to run a query multiple times ...
0
votes
0answers
22 views

Go back to the exact post page number

I use pagination in my index.php and I have many posts per page. Every post have a button to go back to home. The problem is that when I visit a post in a page 5 for example, the button always send me ...
1
vote
0answers
26 views

How to create pagination for custom taxonomy in Wordpress

my code it's this, and i can't create the pagination for that, its working good the pages 1, 2, 3 and etc.. but its just that the pagination links are not showing in the template. I created a template ...
0
votes
0answers
21 views

WordPress Pagination Issue, displaying first page only

I have searched and can't find a solution that is working. I have this exact code on another site and it works. Not sure why it's not working here. All it's doing is ever showing the first page of ...
1
vote
0answers
124 views

Blog post per page setting conflicting with custom WP_Query?

I am creating a theme, and have run into a problem with how a custom WP_Query seems to interact with the Blog pages show at most settings found under Settings -> Reading in the WordPress backend. I ...
0
votes
0answers
23 views

Next Previous link in Custom Post types only within same Taxonomy

I use a Genesis theme and Pods templates for custom post types. I have 4 CPTs for different types of Artwork. Within a given CPT I have a pods field to indicate whether the artwork is available or ...
0
votes
0answers
34 views

posts_per_page problem

I'm new here. So if I ask my question in wrong way, let me correct please. Anyway, here is my problem. I have a post category which has 22 sample posts. I created a shortcode with wp_query which has ...
0
votes
0answers
18 views

pretty urls for categories instead of query string along with pretty pagination

I am trying to add a pretty urls instead of query string like customers/reviews/xyz here reviews is a custom post type and xyz is category customers/reviews gives all reviews and customers/reviews/...
0
votes
0answers
13 views

Taxonomy pagination permalink structure not working

I have registered a custom taxonomy "bookgroup" for custom post "book". To get permalink like "www.example.com/book-group/fiction/" working, I have used code as below. $bookgroup_structure = '/book-...

1
2 3 4 5
35