Make WordPress Core

Opened 4 weeks ago

Last modified 4 weeks ago

#62051 new defect (bug)

Pagination and custom post types that have a hierarchy

Reported by: sherdev's profile sherdev Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: reporter-feedback close
Focuses: ui Cc:

Description

Pagination is not working well with custom post types that have a parent-child structure (a hierarchy).

In my opinion it's a bug since wordpress supports custom post types.

Change History (5)

#1 follow-up: @dingguodong
4 weeks ago

I think you should upload a picture file for this issue, so everyone can get what happened. Thank you!
Just attach a file to show what happened.

This ticket was mentioned in Slack in #forums by dingguodong. View the logs.


4 weeks ago

#3 in reply to: ↑ 1 @sherdev
4 weeks ago

Replying to dingguodong:

I think you should upload a picture file for this issue, so everyone can get what happened. Thank you!
Just attach a file to show what happened.

It's a known behavior that WP doesn'T support pagination when there is a hierarchy of parent-child documents. no ?

This ticket was mentioned in Slack in #meta by dingguodong. View the logs.


4 weeks ago

#5 @hellofromTonya
4 weeks ago

  • Keywords reporter-feedback close added
  • Version 6.6.2 deleted

Hello @sherdev,

Welcome to WordPress Core Trac.

I'm not understanding the bug being reported. Can you please provide more detailed information as well as step-by-step instructions on how to reproduce the bug.

WordPress supports hierarchical post types, including custom post types. It also supports parent-child hierarchy in the pagination. See developer docs for more information https://developer.wordpress.org/reference/functions/register_post_type/.

Here's an example of Books custom post type with parent and child books that uses the Query Block.

Ticket updates for triage:

  • Marking this ticket as a close candidate, as the pagination is working for me and am currently thinking this is not a core bug. That said, not closing yet pending more information being provided by the reporter.
  • Removing 6.6.2 as the Version that introduced the reported bug, as no changes were made in 6.6.2 related to it and comments seem to indicate occurred before 6.6.2.
Note: See TracTickets for help on using tickets.