Questions tagged [pagination]

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

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

Unable to create pagination for Category.php

I'm trying to make a pagination for my category.php. My posts are custom post type. I get a 404 not found error when I'm trying to get to the second page. I realised that this is happening only for ...
0
votes
0answers
17 views

Ajax Pagination link go to /wp-admin/admin-ajax.php/page/3 in second click event

I create a ajax pagination for twentyfifteen child theme. That pagination works fine in first click ( in case of http://example.loc/page/23 ) , but in second click it redirect me to wp-admin/admin-...
0
votes
0answers
15 views

Wordpress API returns empty page when page is less than X-WP-TotalPages

I am querying in the Wordpress API for all pages of media attachments. I am going page by page. I have about 5800 pages and when I hit pages 50-53 they return a blank or more of a [] but it is a ...
0
votes
1answer
18 views

Pagination hitting 404 page on /page/4

This is a bit of a headscratcher. So, I am using the WP Download Manager Pro plugin that creates a custom post type wpdmpro. I have pages for each category, and using the loop, I loop through each ...
0
votes
0answers
31 views

pagination woocommerce i can´t do it

hello i trying to do pagination with php and woocommerce and wordpress this is my nav pagination <div class="nav-links"> <a class="next page-numbers" href='<?php //...
0
votes
0answers
6 views

Custom Taxonomy pagination only working with get_previous_post OR get_next_post, but not both

I am using a custom post type with a custom taxonomy. I am trying to show prev/next pagination on the single, but I want it to limit it to CPT posts that are in the same custom taxonomy. Here's ...
0
votes
0answers
17 views

get_terms pagination

Anyone know how to paginate this get_terms function in wordpress, I tried some options but nothing worked, perhaps its because of the label? <div class="comp-modal-content"> </ul> <...
0
votes
1answer
29 views

Numbered Pagination Showing The Same Posts After Altering WP_Query

I think the title sums the problem up, but I'll explain more with the code below. As you can see, I'm trying to start the loop from the second latest post for some theme reasons which forced me to ...
0
votes
1answer
15 views

How do i make the_posts_pagination look like my template?

Firstly i tried making a custom pagination but i could not work out the .. part and removing the last numbers so i decided to use the default pagination of Wordpress. But currently i am stuck on what ...
0
votes
0answers
15 views

How to make a Dotted pagination in wordpress?

I am currently using this function for pagination. if( !function_exists('pagination')) { function pagination($pages = '', $range = 4) { $showitems = ($range * 2)+1; ...
1
vote
0answers
21 views

How do i improve my custom pagination?

So this is my current pagination Currently i am working with total of 6 pages so it shows 1 2 3 .. 5 6 (in the image below) 5 and 6 being the second last and last But when i reach the number 5 it ...
0
votes
2answers
44 views

Combining WordPress pagination functions for archives and search results

I am currently modernising an old WordPress theme (a standalone theme, not a child of any official themes). Trying to build pagination I am finding some issues creating one function that works for ...
0
votes
1answer
34 views

Pagination not working for archive

The query works for the default blog and pages but not for custom post archives. Did I miss something? $paged_bottom = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1; $...
0
votes
1answer
19 views

How to add Ajax to this Pagination i made?

This is my functions file add_action( 'wp_ajax_homekong_pagination', 'homekong_pagination' ); add_action( 'wp_ajax_nopriv_homekong_pagination', 'homekong_pagination' ); function homekong_pagination($...
1
vote
1answer
41 views

Wordpress single page template, custom post type, pagination orderby title - alphabetical order

I've scoured for QUITE a while, am looking for method to paginate on a single page template, orderby title (client likes first name sorting of team members) I assume this would include a way to ...
1
vote
0answers
16 views

Comment pagination not working

I am trying to have pagination for comments with a widget. The comments are getting loaded properly but the pagination does not work. I have set the pagination in the WordPress set to 3 as well. ...
0
votes
0answers
27 views

Rewrite paging in Wordpress

I am in trouble looking forward to help. I want to change "https://website.com/page/2" to "https://website.com?page=2" in Wordpress. Thank you so much!
1
vote
0answers
64 views

The default code for “posts_nav_link” on category.php isn't working

I am trying to make my own simple WP theme from scratch and I have run in to some difficulties. Maybe someone can help. I have a category named "News", whose slug is "news". The permalink structure ...
0
votes
0answers
12 views

pagination on wordpress and not showing all results

I have this page that shows posts from a range of years selected of a form on a previous page. the first results display the 10 posts as set in args(post_by_page => 10); if there are more posts I ...
1
vote
1answer
36 views

Add Pagination on Custom Post Type Archive

I've moved custom posts on what would normally be an archive template over to a dedicated page template. I've been following this article: https://jasonyingling.me/use-page-custom-post-type-archive-...
0
votes
0answers
10 views

Add pagination - syntax error when copy/pasting

I want to add pagination to this page: https://documentarynow.org/genre/documentary/ Can anyone explain why neither of these codes works? The theme developer added this code, which made the page ...
0
votes
1answer
66 views

Limit Timber pagination number items

Transparency: Wordpress newbie here. 👋🏻 I am working on a Wordpress Timber/Twig project and I've added some pagination based on the documentation here: https://timber.github.io/docs/guides/...
1
vote
1answer
121 views

wp_title() returns 'page not found' on page 2

I'm currently making a custom Wordpress template, and I'm using paginate_link to make page links at the bottom. index.php <?php get_header(); ?> <div class="container"> <div ...
2
votes
1answer
32 views

wordpress Next/Previous post in same category not working

I use the following code to get the Next /Previous link in the same category In localhost, it worked good but in my Cpanel host doesn't good working Following code: First, get current id post and ...
0
votes
1answer
27 views

Wordpress posts loop pagination - first page return 125 posts instead of 10 and the rest return 10

I'm trying to show 10 posts per page with pagination on WordPress and the first page return 125 posts instead of 10 and the rest of the pages return 10 posts as requested, please assist :) $paged = (...
0
votes
1answer
13 views

What template file is used for homepage pagination?

This is most likely a duplicate and I'm just struggling for the right way to search it but what file is used to display actual pages of posts, not the post type of page but like /blog/page/2/ for the ...
0
votes
0answers
16 views

empty pages on pagination with meta query

I am using meta query to filter posts by various meta tags, showing 9 posts/page, but on pagination there are as many pages as were all the posts displayed without filtering, only that empty pages are ...
0
votes
0answers
41 views

Pagination inside the blog page not working

I have a widget which creates a grid with pagination. If I am using the pagination then it works fine when used on the page to display grid. But when I am using that in inside a blog post. The ...
0
votes
1answer
47 views

Can I use paginate_links() to add a pagination list, yet prevent it from inserting links?

My page displays a list of WordPress users. For pagination, I have used the function paginate_links. This inserts a list onto my page e.g. page 2 page 3 page 4 (screenshot). And each list item is a ...
0
votes
1answer
27 views

How to create a WordPress gallery with pagination

How would I create a gallery like this - https://www.sumcoco.com/2019/02/08/30-dutch-braid-tutorial-for-2019-latest-season/27/ The pagination also changes the url for each image... I know the above ...
0
votes
1answer
40 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
0answers
31 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( $...
0
votes
0answers
57 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 ...
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>...
-1
votes
1answer
20 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
14 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
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
47 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
20 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
5answers
47 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
23 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
25 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
25 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
26 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
104 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
42 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
67 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
45 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
19 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 ...