Skip to main content

Questions tagged [pagination]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

Custom post type removing /page/2/ from URL when trying to access it

I made a shortcode to list form entry data that paginates using paginate_links(). I added this shortcode to a regular page and it works fine. If I click on page 2, it refreshes the page and adds the /...
Aristocles's user avatar
0 votes
0 answers
42 views

"Page not found" while on page 2 from pagination menu

all. I'm getting a "Page not found" message in my firefox tab when I click page 2 in my pagination menu. What's odd is, the content shows up just fine on all paginated pages. I've tried ...
harshclimate's user avatar
0 votes
1 answer
30 views

How can I highlight the active page using paginate_links()?

I wrote this code: <div class="col-12"> <div class="pagination d-flex justify-content-center mt-5"> ...
user242793's user avatar
0 votes
1 answer
57 views

Pagination URL not good

the theme I made didn't have a search functionality. I started receiving in Search Console thousands of soft 404 for similar pages: https://www.example.com/?s={search_term_string}page/3page/2page/...
Pikk's user avatar
  • 279
0 votes
0 answers
13 views

Issues with Ajax Pagination and Filtering

I am creating a website and just can't manage to get the pagination to update when a filter is selected. block.php <section class="photographers full-width-grid mt-<?= $attributes['margin-...
Patrick's user avatar
1 vote
0 answers
24 views

Custom post type sub-category pagination return error 404 on second page

I have a custom query as follows: $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'post_type' => 'programme', 'posts_per_page' =&...
Azman Ishak's user avatar
0 votes
0 answers
35 views

Trying to create a cutom query with pagination and page 2 breaking. Any help?

This is what I have tried so far: <?php /* Template Name: Archive-posts */ ?> <?php get_header(); ?> <main id="primary" class="site-main"> <div class=&...
Ivan Bezerra's user avatar
0 votes
0 answers
9 views

Trying to create wordpress pagination and breaking while live [duplicate]

I have been coding a pagination for my WordPress site, for a custom post query. and while it works just fine in my local machine it breaks online. I get a 404 when trying to click on page 2, while ...
Ivan Bezerra's user avatar
0 votes
1 answer
64 views

Custom post type pagination not working in index.php file

I have created a custom post type called news Here is the code function create_post_type_news() { $supports = array( 'title', // post title 'editor', // post content 'author', // post author '...
Vivek Saha's user avatar
0 votes
1 answer
94 views

Custom post type category pages pagination returns 404

I currently have the main posts archive page at /blog/ (custom permalink structure of /blog/%postname%/) and categories at /blog/category/ (categories base left empty so it defaults to this). I have a ...
ajs_app's user avatar
  • 15
0 votes
1 answer
63 views

Stop the_posts_pagination() from passing on any url parameters?

I am using the_posts_pagination() on my native archive pages and paginate_links() on some pages with custom queries. However, the function seems to pass on any url parameters from the current page. If ...
vividog3873's user avatar
0 votes
2 answers
44 views

Why aren't all my posts retrieving?

I am trying to create a small custom snippet of code to generate a query of posts on my website. I use the plugin Advanced Custom Fields (ACF) to tag the country of origin on to posts on the website. ...
Rach's user avatar
  • 1
1 vote
1 answer
38 views

Parameter for pagination posts_pagination

I created a pagination with the_posts_pagination() function Right now it looks like this and it works fine: Previous 1 2 3 4 Next When I am on the 1st page, the "prev" button disappears or &...
user avatar
0 votes
1 answer
49 views

Query Multiple Post Types and Paginate Newly Created List

I know this has be asked several times but i cant seem to find the answer anywhere. My site has a resources page which is my archive for all resources (archive-resources.php). I'm trying to also ...
user2402492's user avatar
0 votes
0 answers
67 views

Multiple WP_Query with pagination shows Page/2 content on the remaining pages

I have gone through many articles and scrolled through almost all the questions here but couldn't resolve my issue. So I'll explain my scenario in detail My index.php looks like this which segregates ...
user3362364's user avatar
0 votes
1 answer
87 views

Multiple queries and pagination

I have a homepage and an archive page where I call a template part to have a hero section for the most recent posts, and then loop through the remaining posts as usual. Essentially I don't want to ...
lastnoob's user avatar
  • 153
0 votes
0 answers
51 views

Woocommerce paginate link generates #038 instead of ? - seems connected to caching

If I don't reset my cache before using the shop page, #038 appears in the URLs generated in the pagination links at the bottom of the page, and the pagination doesn't work (stays on the same first ...
Resh's user avatar
  • 1
0 votes
1 answer
225 views

posts_results filter - additional sort, with a meta value, to move posts to the end of the results, with pagination working

I have a custom post type for business locations that I am trying to add an additional sorting filter to by using a custom meta value. The custom field specifies whether or not the location is open or ...
user13286's user avatar
  • 255
0 votes
0 answers
20 views

Pagination Links for Custom post type returns 404 [duplicate]

first of all, I am new to WP development, and PHP. I am developing a template that has several custom post types. the problem is when I add pagination to my custom post type, all pagination links ...
Ehsan Aliverdi's user avatar
0 votes
0 answers
82 views

WP Category Archive /page/2+ pagination issue 404

Encountered an issue when navigating to archive pages within a category after page 1 of the results via pagination. This is the standard WP categories and not a custom query. Working: /category/...
ejay's user avatar
  • 1
0 votes
1 answer
51 views

Pagination with WP_query giving same items in each page

I have around 250+ blog posts and currently in my custom theme I've implemented the functionality of showing the blogs with pagination option. But in all pages it is showing the same posts. <?php $...
buzz's user avatar
  • 101
1 vote
0 answers
469 views

Wordpress Custom Post Type Archive, filter by category and get pagination working

I have created 9 different Custom Post Types via ACF and an assortment of custom field blocks for 8 of them. Those 8 are used to create different content, based on requirements for each post type. The ...
Mitch S's user avatar
  • 27
0 votes
0 answers
24 views

Bulk 301 redirect for Taxonomies with pagination

I'm looking for the best way to bulk redirect for modified taxonomy URLs. After category slug has been changed, I need to perform a redirect for all paginated pages: /category-old/ redirects to /...
Alexius The Coder's user avatar
0 votes
0 answers
28 views

Create an archive page by combining two post type

I wanna create an archive page for both normal posts and a custom post type(gallery). I created an index.php file and put my code in there but its pagination ain't work correctly. all pages look the ...
Poorya Ghorbani's user avatar
0 votes
0 answers
72 views

Add pagination to a page with sections

I have on my website, on a specific page (library), several vertically arranged sections. The problem is that there are too many (they look like posts, but they aren't). (I create and edit these ...
EDG_DGK's user avatar
0 votes
0 answers
23 views

Pagination works only on index.php and not archive pages

I have a pagination function which i intend using for all pagination on my wordpress blog, but the function doesn't work on archive.php, category-music.php and other archive pages, while it works ...
Sarah Douglas's user avatar
0 votes
0 answers
94 views

Why WordPress custom php code for pagination cannot go to next page

Link before I click search: https://nama-sistem.com/carian/ Link after I click search (by name, month, year, theme): https://nama-sistem.com/carian/?nama=abx&month=july&years=2022&theme=...
beginner's user avatar
0 votes
1 answer
18 views

How to display paginated posts from all categories?

I found this code that helps to paginate the posts of one specific category, how can I change it to have a posts paginate function for all categories? (WordPress) global $wp_query; $result = new ...
Andrea Sacconi's user avatar
0 votes
1 answer
294 views

My pagination creates a redirect

Can you help me this time to fix this problem my code is: public function numeric_pagination() { global $wp_query , $wp_rewrite;; if ( $wp_query->max_num_pages < 2 ) { ...
Ali Kiani's user avatar
0 votes
1 answer
51 views

Search pagination rewrite to fix 404

I'm wondering if anyone can help me out here? Basically, I think I need to use add_rewrite_rule() to get pagination working in my search results, as I've gone beyond the default query due to a bunch ...
Jase Warner's user avatar
0 votes
1 answer
58 views

wordpress category rewrite rule with pagination

with the help of someone here I was able to filter two or more categories via this rewrite rule '^combine/([^/]*)/?([^/]*)/([^/]*)/?','index.php?category_name=$matches[1]+$matches[2]+$matches[3]', '...
inrob's user avatar
  • 103
0 votes
0 answers
206 views

Pagination only showed when no category is set in wp_query

tldr: On my production site only, when I set category_name to any category my pagination does not show up. Once I remove category_name from my wp_query the pagination shows up (for all posts on my ...
james's user avatar
  • 135
1 vote
1 answer
517 views

Why do I get a 404 error on my custom post type archive pagination?

When I try to set up pagination on my custom post type archive page I get a 404 if I click on the next page. The first page works fine. Any idea what I'm doing wrong? <?php get_header(); ?> &...
Lisa's user avatar
  • 13
1 vote
1 answer
180 views

Limit paginated result set to a maximum number of posts

I would like to create a paginated result using a maximum number of posts. I have been trying to achieve this using \WP_Query class e.g: function getQuery(int $page, int $posts_per_page = 2, int $...
Cyclonecode's user avatar
  • 1,164
0 votes
1 answer
57 views

Search results stuck on page 1

The problem statement For some reason when the user does a search the results page (search.php) only show the first page results. The pagination (next and previous links) also believes its on page 1. ...
Mike's user avatar
  • 111
1 vote
0 answers
89 views

How to build custom pagination with center pages

How to build custom pagination in WordPress, which display center pages. For example if there is 100 pagination pages, pagination should look like this - for active page 1: 1 2 3 49 50 51 98 99 ...
dmj5's user avatar
  • 11
0 votes
1 answer
93 views

Why does WordPress keep directing or forcing my pagination?

Why does WordPress keep directing or forcing my pagination? I want my news pagination to work like this: /news/?paged=2 But WordPress keeps forcing it to: /news/page/2/ And then I get a 404 page! ...
Run's user avatar
  • 331
0 votes
0 answers
47 views

Access to a data from a response AJAX called in a template file php

I use an ajax called to get all posts of a custom post type and other criteria. I would like to get the response of my ajax called and use it in a template php file. So my question is : how can I pass ...
davidb45's user avatar
0 votes
0 answers
23 views

CPT Archive Pagination - Page not found

I have the following code to register my CPT, related taxonomy and rewrite rules. $store_name = 'store' add_action('init', function () use ($store_name) { register_post_type( 'my_sample_cpt', ...
Anand's user avatar
  • 1
-1 votes
1 answer
22 views

Insert image between X number of posts but on specific paginated pages?

I'm inserting an image in-between every 5th post using the code below but obviously it shows up on every paginated page. Is there a "pagination" function available to show the image every ...
Nate M.'s user avatar
  • 77
0 votes
1 answer
28 views

Insert multiple custom components after x-number of posts

While there are many posted solutions on how to insert custom components between posts, I haven't been able to find one that addresses pagination. Currently, on my Wordpress archive template, each ...
scottrod's user avatar
  • 101
1 vote
0 answers
26 views

WordPress is adding pagination for all pages not only for blog page, How to remove pagination for all pages except blog/posts page?

You know WordPress is adding pagination for all pages not only for posts page/blog page. For example www.mysite.com, I'm getting URLs like www.mysite.com/page/15, etc. Here, www.mysite.com has a ...
Murali Krishna P's user avatar
0 votes
1 answer
66 views

Pagination not working only on Archive-Name.php using new WP_Query

I created an archive-sticky.php where I added the code below to show all sticky posts in one single page with pagination as there will be 100s of sticky posts in the coming days. Now, this code ...
Elaine Byene's user avatar
0 votes
0 answers
23 views

Separate page for pagination possible?

This is how my index.php looks like for my custom theme (I'm not sure if Line 4-5 is necessary). When I put pagination in the home or post, I would like to be able to take the user to a separate ...
Elaine Byene's user avatar
0 votes
2 answers
82 views

Blog Posts not sorted and pagination not adjusted after filtering some category

Hello im really stuck and messing around now so i thought i give a try and ask the community. Im working on a Blog Post page where im showing some posts. The user have the selection to search for ...
Jaba's user avatar
  • 63
0 votes
0 answers
116 views

add_rewrite_rule pagination 404 error on page 4 and above

I am working on a site using Wordpress 6.0.2. Astra is the theme and I am using Elementor Pro. I have lots of custom post types and taxomonies. I am using add_rewrite_rule like this: add_rewrite_rule( ...
Steve Hoare's user avatar
0 votes
0 answers
34 views

Pagination not working on custom post type archive

The pagination is not working. In settings > reading I have set '3' posts for blog pages show at most. On my custom post type archive page, I have 9 posts showing and I have this code. Not sure ...
Carina's user avatar
  • 1
0 votes
0 answers
124 views

the_post_navigation in single page with multiple taxonomies

I am creating a custom content that can belong to several categories: status, age and specie. For now there are only the following terms for these taxonomies: species: dogs, cats age: adult, young, ...
josepfs's user avatar
0 votes
0 answers
27 views

Sub menu for a (single) page

I am looking for a way that let's me subdivide a page with a pagination-like menu. However, I want to name the menu-items (no numbers...) and don't want the entire page to refresh when clicking on a ...
Simon Fromme's user avatar
0 votes
0 answers
122 views

Pagination links not working for custom taxonomy

I have a Custom Post Type (project) and a Custom Taxonomy (project_category). I have created a Page (Projects), which uses a custom template, in which I run a WP_Query to fetch projects and display ...
superfive33's user avatar

1
2 3 4 5
37