Questions tagged [pagination]

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

Filter by
Sorted by
Tagged with
0
votes
3answers
5k views

Show number of posts AND number on current page

I know how to show the total number of posts in a site, but is there a way to show the number of posts the page you're on is displaying? For example, I want to show this at the bottom of each of my ...
0
votes
0answers
18 views

WordPress Sub Category Archive, Show Extra Empty Page Number in Pagination

This my code for sub category archive page: <?php // the query $the_query = new WP_Query(array( 'category__and' => array( 2 ), ...
0
votes
0answers
14 views

Wordpress pagination for custom page template for custom query

I am pulling all the default posts in a custom page template using a custom query and custom loop. Things to mention here is that I have several custom query on the same page. All those queries are ...
0
votes
0answers
10 views

How to insert html code in to a specified pagination number?

I wish to put a banner into an exact pagination number, example: h@@p://mysite.com/category/categoryname/page/370/ is that possible?
0
votes
0answers
7 views

Cache is accumulating /page/<number>, copies of home page

I recently started using a caching plugin. I noticed it started caching /page/2/, /page/3/, etc., and they are all copies of the home page. If I browse to a new page number, it shows the home page ...
0
votes
0answers
19 views

previous_posts_link & next_posts_link doesn't generate any output

Hey I am using a WPQuery to loop through and show blog categories in posts. It's in a page tempplate. has 21 posts and I want them to show 10 per page with navigation links for next pages of 10 posts ...
0
votes
1answer
3k views

pagination in woocommerce order history page

Please help me to add pagination in my order history page. Pagination should work like WooCommerce products page. Here is my code: <?php $customer_orders = get_posts( apply_filters( '...
5
votes
1answer
832 views

Implementing a general Table of Content across single paginated post pages

I am working on a blog and most of my posts are so long they require pagination. See one of my posts. This post has a lot of pages. The only problem is that I can't find a way to show a table of ...
0
votes
1answer
20 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
249 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
26 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://...
1
vote
1answer
24k views

Creating a custom category page with pagination

The past week I've been trying to figure it out on creating a custom category page with pagination. I've tried in so many ways but I cant get the pagination right. If anyone of you can help. What I ...
-1
votes
2answers
28k views

Pagination Using ajax

I want to use Pagination using ajax for custom post taxonomy. Many of codes are tried by me but at the last I was failed. So,how can i use pagination using ajax without plugin? When i am clicking on ...
0
votes
0answers
23 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
11 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
25 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
21 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
25 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
1answer
25 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
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
8 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
38 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,...
3
votes
5answers
12k views

Change class=“page-numbers” in pagination

I'm using the following code (from here) to paginate links: function custom_pagination() { global $wp_query; $big = 999999999; // need an unlikely integer $pages = paginate_links( array( ...
0
votes
0answers
20 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 ...
1
vote
1answer
264 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 ...
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
145 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
0answers
55 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
64 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 ...
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
0answers
20 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 ...
11
votes
4answers
36k 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 ...
21
votes
3answers
8k 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
636 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
429 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
34 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="...
3
votes
2answers
3k 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
35 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
330 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
33 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
16 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
532 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
0answers
34 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
22k 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 $...
1
vote
2answers
108 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
44 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
134 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
130 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