Questions tagged [pagination]

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

Filter by
Sorted by
Tagged with
-1
votes
1answer
15 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
8 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
43 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
1answer
25 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
14 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
1answer
433 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
1answer
427 views

Pagination - works on local but not live dev!

Can anyone please shed some light as to why the following to print out page numbers works on my local dev server but not on my live server? Both server are running same version of PHP. My Loop <?...
1
vote
3answers
433 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
23 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
16 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
520 views

Pagination using paginate_links

I am using the built in paginate_links function and setting formatparameter to the default value: '?paged=%#%' . For some reason, it keeps redirecting to a different formatted url. For example, when I ...
0
votes
1answer
475 views

Add Custom Pagination Permalink

I'm trying to create a page with multiple loops on it and as such also need multiple pagination. This is proving to be a touch difficult, I've managed to get the links to show correctly by using the ...
0
votes
1answer
18 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 ...
1
vote
1answer
728 views

How to add pagination to comments?

I am using wp_list_comments(); function to list all the comments, but I want to add some pagination, for example 10 on one page. I tried "Break comments into pages..." in Discussion panel but it ...
0
votes
1answer
487 views

Paginate Links in Wp Query Shortcode

so been looking around for this answer, but no go -- basically i have a WP Query that is incased in a shortcode.. I have set up the paginate links function which outputs it on the page. However, the ...
0
votes
1answer
778 views

Problem with custom WP_Query and underlying pagination/posts_per_page

In my category template (category.php) I have the following code: <?php // Setup custom loop -- we need to exclude featured posts from listing so they aren't repeated $paged = get_query_var('paged'...
0
votes
1answer
19 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 ...
1
vote
2answers
550 views

get_next_posts_link not working without parameter max_num_pages

I have a custom search page (searchpage.php) using pagination, and I am tring to add lines like below dynamically to my header.php inside <head></head> tag for better pagination SEO. <...
0
votes
1answer
525 views

Pagination not working on my archive page for a custom post type

First off I have a custom post type called events, and I wrote a custom query in in my archive-events.php file. Everything is working great except for the pagination. To trouble shoot I stripped ...
0
votes
0answers
23 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
19 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
2answers
548 views

Adding pagination to a custom archive template

I'm trying to add pagination to my archive template. If I use the same code as on my main blog template it doesn't filter results based on the tag in the URL, instead it simply shows all posts. ...
0
votes
0answers
18 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
565 views

How to get all images in Media Gallery with pagination?

I want to get all images in the image gallery with pagination so that I can use infinite-scroll with it. The infinite scroll works but it's taking the posts' number of post, not the images. That ...
0
votes
1answer
35 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="...
0
votes
1answer
570 views

Style first 3 posts differently and use a 2nd loop to get rest of posts / offset and pagination broken

I'm working on a theme and I am having trouble with loops/pagination breaks when using an offest. I looked online and tried to use only 1 loop (per this post) but I'm having trouble making it work. I ...
0
votes
1answer
663 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
3answers
9k 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
889 views

Count posts for pagination

I'm doing the pagination for a web. < Previous (pagenumber) Next > is easy, already done. But now I need to add a selector to go to a page directly (ex: to page 7), to do so, I need to know how ...
0
votes
1answer
536 views

get_next_posts_link() stops displaying at page 4

Please start by taking a look at this quick video: http://www.screenr.com/8vSH The problem: get_next_posts_link() disappears on page 4. That is, the "go to older posts" link disappears once I am in &...
0
votes
1answer
20 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
546 views

How to fix blank pagination links?

I am working on a Wordpress blog that has what appears to be custom pagination for the posts. As you can see here the correct amount of links are being rendered at the bottom of the page, however ...
0
votes
1answer
15 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
18 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 ...
4
votes
2answers
4k views

Display all posts from all categories with pagination

Alright, this might be a tricky one to explain but I'll do my best. At the front page I want to display all the posts from all the categories. However I want them to be divided. Take this for an ...
0
votes
2answers
174 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 ...
1
vote
2answers
530 views

Querying Custom Post Type, ordering by Custom Taxonomy Pagination Not Working

Maybe there's a better way to do this. Let me explain what I have right now: I have a custom post type (Products), and a custom taxonomy (Manufacturers). What I have outputting so far: Manufacturer ...
0
votes
1answer
24 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
581 views

Posts loop with pagination on a single post page

Today, I need your help. On my pages I have a sidebar with : <div class="sidebarActu"> <ul> <?php $i = 1; while ( have_posts() )...
0
votes
1answer
673 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
2answers
672 views

Pagination: Last Page Missing

I've about 12 records and that means I should have 4 pages. My best attempt so far at getting pagination to work is this, and I'd really appreciate if someone could tell me where exactly am I going ...
8
votes
6answers
16k views

Get current URL (permalink) without /page/{pagenum}/

How can I retrieve the current URL (whether homepage, archive, post type archive, category archive, etc) but always without the /page/{pagenum}/ part if it's present? So, if the real URL is: example....
0
votes
0answers
10 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
24 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
26 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 ...
0
votes
1answer
574 views

Changing post per page causing 404 for pagination. Need a redirect htaccess rule

i changed my wp theme and i changed the "post per page" wp setting on "reading"now because i want to display more posts on the archives pages. i m using pagination on the archives so a lot of pages ...
0
votes
1answer
577 views

Rewrite Rule & Regex - Extract 'cat-name' and 'page-number' from http://domain.com/custom-post-type/category/cat-name/page/page-number

I have an URL formatted so: http://domain.com/custom-post-type/category/cat-name/page/page-number I need to extract: cat-name and page-number So that in my functions.php, I can create the custom ...
1
vote
1answer
604 views

Sorting Custom Posts on Archive page with pagination

I've got custom taxonomy archive pages with a drop down list that allows users to re-order/sort the posts. It basically waits for the user to select from the drop down then uses array_merge( $wp_query-...
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 ...