Questions tagged [pagination]

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

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

Add Pagination in custom Blog page template

I am using custom page for blogs(page-allblogs.php). I have not written all the code in this page because i wanted write clean codes. So this page has following codes: <?php get_header();?> &...
0
votes
2answers
22 views

How to set up posts per page on WP

I add this code on my website [display-posts image_size="thumbnail" wrapper="div" wrapper_class="display-posts-listing grid" meta_key="_thumbnail_id" display-post category="<code>...
0
votes
0answers
35 views

Subcategory pagination 404 error on page 2

I'm facing a strange problem with the subcategory page pagination. I had the same problem with pagination in category page, solved with this snippet in functions.php: function custom_pre_get_posts( $...
7
votes
9answers
32k 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
0answers
69 views

Problems in paginate_links with custom query loop and MB-Relationships

Im having some troubles with paginate_links. Im using the plugin MB-Relationships, and 2 custom-post-types: Artist and Artworks. On the single-artist I need to do a Query to show all the artworks ...
-1
votes
1answer
24 views

pagination leads to 404 page

I’m going nuts trying to figure out why my pagination isn’t showing up. I’ll set the scene: I have a page "category.php". In this page I have a custom query set up for all of my categorize posts. ...
0
votes
0answers
15 views

How to show pagination for posts grouped by category?

I have a blogs page where I list all categories as tabs. On click of a tab(category) I shoot the API call example http://my_domian/abc/wp-json/wp/v2/posts?categories=35 where 35 is the category Id. ...
0
votes
5answers
51 views

Pagination for Category does not work

I am trying to implement pagination for category items listing archive.php page. But this does not work. Below is the code that I am using. Custom Query: $cat = single_cat_title("", false); $cat_ID =...
0
votes
0answers
28 views

I would like to fix a problem with post pagination: i can only see the url title (prev - next) but title is truncated

This is my "problem": I can't see a proper pagination in the single post. The url-title corresponding to 'previous article' and 'next article' is truncated, it is broken and it is really awful to see, ...
0
votes
1answer
17 views

How do I make a custom “Read More Blogs” button for my blog page

I'm actually working on my custom wordpress theme. And, when I tried to develop a "Read More Blogs" button, I was unable. Because, all the examples I saw on internet was for pagination. I need a ...
0
votes
2answers
60 views

Cannot go back to the first paginated page using pagination links

I embedded standard code for pagination links and everything is working fine except that clicking the Previous or Page 1 link does not take me back to the first paginated page. This is different from ...
0
votes
0answers
23 views

How to add results to wp-query with pagination?

I'm trying to add results with pagination to the main query results with custom arguments. But the problem is that I'm getting the second loop result in every pagination page. The goal is to add them ...
0
votes
1answer
29 views

Pagination Error : Duplicate argument being outputted

I've been writing a custom search.php loop for some time now and I'm running into a weird problem. My php argument is outputting some unexpected results by repeating the template file. Currently I ...
0
votes
1answer
39 views

paginate_links with select option

This function output : <<NEXT [SELECT] PREV>> i need this : <option value="link/page1">Page 1</option> <option value="link/page2">Page 2</option> how do I ...
0
votes
0answers
26 views

Custom post type, next and previous links by page title

I have a site that I am converting to wordpress and have a problem with the next post and previous post, because the default value is to sort the posts by date order. However, I want to sort the next ...
0
votes
0answers
34 views

Custom post type query with pagination doesn't work

I've one custom post type name of "videos" now I want to query in a custom template from that CPT. Here is my custom post register code register_post_type( 'videos', array( '...
0
votes
0answers
236 views

WooCommerce Custom Query with high/low pricing and paging

I created a custom query in my template to show certain products. I would like to add a sort feature for pricing ascending and descending but have not had any luck. Here is my code on my template: &...
0
votes
1answer
50 views

Remove pagination if search returns empty

I made a fix that when the searchbar is empty, it returns 'No results', instead of all posts, but the pagination still shows up. Does anyone know a fix for that? My code search.php: <div class="...
1
vote
3answers
10k views

Pagination shows same contents all pages

Here is my loop $my_query = new WP_Query(array( 'cat' => -399, 'posts_per_page' => 6, 'offset' => 5, 'paged' => (...
0
votes
1answer
126 views

Why pagination is not working with tax_query param?

this is my query: $p_query = new WP_Query(array( 'post_type' => $post_type ,'post_status' => 'publish' ,'posts_per_page' => $per_page // 6 ,'paged' => $page // 2 ,'...
0
votes
1answer
60 views

Yoast primary category query modification

I have a problem with Yoast and displaying my primary category alongside rest of the posts from that category. Let's say I have 4 posts, all of them are lorem category and one post has set lorem as ...
0
votes
0answers
20 views

Remove post name of custom WP_Query when using in pagination?

Is this possible? I am trying to get pagination working on my pages and single pages. It seems like it's working, as it recognizes how many pages there are and shows the URL. The problem: the URL is ...
0
votes
2answers
345 views

Custom loop pagination links not working

I'm bringing up an issue that could not be solved after googling for solutions over a few days. The goal I have to meet is to output a pagination for a custom post type named office-magazines with ...
0
votes
1answer
32 views

Pagination broken after using 2 loops to show content

I wanted to use different HTML for the first post in a blog. I did it by making 2 loops. Unfortunately this has stopped the pagination from working. I guess it is because I am creating a new query to ...
0
votes
1answer
875 views

pagination on data fetched using SQL query

I am new with php and word press. I have a question that I am using a sql query in my posts to get data from my data base. Now the problem is that I have huge data on my post and I do not have idea ...
0
votes
0answers
15 views

Custom archive page pagination issue

The WP Setup I created a template, broadcast-archive-template.php, that contains code that functions as a custom post type archive page. We set the page template to the template in the WP admin to ...
0
votes
1answer
27 views

Pagination on archive.php not working?

My pagination isn't working for my archive.php, which I'm using as a template for my blog post categories links. <div class="row"> <?php $the_query = new WP_Query( array( ...
0
votes
1answer
32 views

Homepage has Paged Pages that should not exist, like /page/2/ and on to /page/99999/

The backstory is I noticed the homepage was generating infinite paginated pages. This is a custom built theme. I was using index.php and WP_Query to create 2 small 5 post loops. I figured WP_Query ...
0
votes
0answers
17 views

Paginated Category with Custom First Page

I'm creating a blog, and I have category pages set up to show a custom layout on the first page. However, my pagination is broken and I can't seem to figure out the issue. Below is my code. It counts ...
4
votes
4answers
10k views

Pagination not working on home page

I've a page named "share" with a complex loop that's working perfectly. This page is located at domain.com/share. Now I need to use this page as the home page, so I went to "Settings -> Reading" and ...
0
votes
0answers
12 views

Implement pagination on media library or stop infinite auto lazy load

I have a project with a quite extensive Media Library. Everytime an admin user gets into the Media Library it ends up making several hundreds of requests, as per default it progressively lazy loads ...
1
vote
1answer
65 views

Modify WP_List_Table pagination “item(s)” text?

I'm developing a plugin which creates several custom tables on pages in the WP dashboard. My question is whether it's possible (without modifying core files) to change the text displayed in the ...
0
votes
0answers
15 views

wordpress pagination issue

because of some duplication and as i am not getting my desired result i have removed my previous questions i have asked about pagination issue , i am posting again so i might get any help . if ( ...
0
votes
1answer
73 views

Custom query pagination with php parameter as arg problem

I have create a loop with a custom query. This query contains a php parameters that i m getting from url with GET method. The problem is that the pagination (even if it counts the posts correct at ...
0
votes
1answer
46 views

paginate_links method doesn't show second page of my custom wp_query

I'm trying to create a custom search page using wp_query. I'm using post method to get search values. At first, the search was doing fine, but when i got a search results of more than 4 posts (i set 4 ...
0
votes
1answer
23 views

Sidebar pagination posts not shown when sidebar is in single.php

A quick question. So I have created a loop in a new file called sidebar-extra.php which I include via the header.php into my single.php file. Problem: when I go to a post (single.php), I can't see ...
0
votes
2answers
44 views

Broken pagination links on WP 4.9.10 blog pages

We noticed a weird issue on our WP 4.9.10 blog pages when going to 1st page. Right now we can go to 2nd or 3rd page by clicking the page numbers but saw that it gives 301 code when going to 1st page ...
0
votes
0answers
24 views

Wordpress Page 2 of Posts not Showing results, but if i select a Category first, then results show fine?

I'm having problems with my Blog listing. It shows results on the initial index.php page, but as soon as i click my pagination links to view results on page 2 or 3 etc it says in the Meta Title "Page ...
1
vote
1answer
153 views

Remove pagination from WooCommerce product categories on admin edit navigation menus

I am creating a WooCommerce store with a very big nested menu structure. Is there a way to stop my product categories from paginating? I need them to all show in one big list so that I can use Ctrl+...
0
votes
0answers
58 views

Wp_Query Post per page not working?

I have specified the post per page to be 3 as arg but it does not seems to work, all the post are being shown up. Not sure why i works if i enable no paging false but pagination shows up. Array ( ...
0
votes
0answers
22 views

Breaking a post into multiple subpages, each with a custom slug

I'm trying to break a single page into multiple subpages. Started out using <!--newpage--> html comments, but then decided to switch to a customized version of the multipage plugin. The basic ...
0
votes
1answer
31 views

Pagination 404 error(I have refreshed the permalinks and tried several previous options)

I am using pagination in wordpress, the truth is that I have used it several times. But this time, when I access page number 2, I get an error 404. I've searched a bit and I've tried several functions,...
0
votes
0answers
30 views

Wordpress custom post type taxonomy paging

I am trying to pagging my taxonomy-products_categories.php. But unfortunatily it throw me to 404.php page rather then page/2. Following is my code for custom post type and its taxonomy. $labels = ...
2
votes
1answer
134 views

Pagination links not showing on custom post type admin list

In my own plugin I have a custom post type faq. In the admin listing are 14 faq posts. In the Wordpress Settings under Reading is 10 posts per pages set. Additionally, I have added a pre_get_posts ...
0
votes
1answer
22 views

Remove “Page” from Category archive

For the moment my site category archive URL show as example.com/blog/category/all/page/2/ I want to remove "page" from slug so it should display as: example.com/blog/category/all/2/ Any tips how I ...
0
votes
1answer
145 views

ACF Repeater Pagination stopped working since upgrade to php7.2

Since updating to php7.2 the pagination function has stopped working on a gallery built with ACF repeater. I suspect it's an issue with the count() function I've found some articles relating to this ...
1
vote
0answers
26 views

?cat=-1 Indexed Versions Of Homepage

I'm finding some strange query strings on my homepage are indexed in Google and causing duplicate content. A couple of examples: https://sciencetrends.com/page/103/?cat=-1 https://sciencetrends.com/?...
3
votes
4answers
20k views

Using paginate_links() to generate “1, 2, 3 … 10, 20, 30, 40… 55” paginations

I found this code : // Get total number of pages global $wp_query; $total = $wp_query->max_num_pages; // Only paginate if we have more than one page if ( $total > 1 ) { ...
1
vote
1answer
443 views

How do I fix this 'Undefined variable:' debug message?

The code below (which I use in functions) is from https://stackoverflow.com/questions/35263445/numeric-pagination-on-my-custom-category-page, and is showing a debug message of 'Undefined variable: ...
1
vote
0answers
196 views

Blog page pagination is not working after using the offset argument

I have displayed the recent 7 posts then shown the remaining posts. So I have added the offset = 7 in the argument to skip above 7 recent posts and display remaining posts but the pagination not ...