[wp-trac] [WordPress Trac] #56992: The Loop displays incorrect data for queries started with `fields => 'id=>parent'`.
WordPress Trac
noreply at wordpress.org
Wed Feb 26 00:19:49 UTC 2025
#56992: The Loop displays incorrect data for queries started with `fields =>
'id=>parent'`.
-------------------------------------------------+-------------------------
Reporter: peterwilsoncc | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.8
Component: Query | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests dev- | Focuses:
feedback 2nd-opinion |
-------------------------------------------------+-------------------------
Comment (by peterwilsoncc):
@SirLouen Are you able to clarify the concerns were discussing with
@oglekler? I think you're worried about the change is return type for
`WP_Query::next_post()` but I might be missing something. Is that correct?
Re the performance concern: When `WP_Query::the_post()` is called, the
cache is primed for all posts returned by the query. The same isn't true
for `WP_Query::next_post()` although it is intended that when traversing
the loop the former is called. If it proves to be a performance issue, it
might be possible to prime the cache it the `next_post` method too.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56992#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list