[wp-trac] [WordPress Trac] #8107: get_next_post, get_previous_post do not work for posts posted within same second

WordPress Trac noreply at wordpress.org
Tue Jul 1 16:41:04 UTC 2025


#8107: get_next_post, get_previous_post do not work for posts posted within same
second
----------------------------------------+-----------------------------
 Reporter:  whoismanu                   |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Posts, Post Types           |     Version:  2.7
 Severity:  normal                      |  Resolution:
 Keywords:  needs-testing dev-feedback  |     Focuses:  template
----------------------------------------+-----------------------------

Comment (by callumbw95):

 Hi All,

 I have retest this issue within the latest release and can confirm that
 this is still an issue. As of such I have attached my bug report below:

 == Bug Report
 === Description
 Describe the bug.

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.4.7
 - Server: nginx/1.27.5
 - Database: mysqli (Server: 8.0.40 / Client: mysqlnd 8.4.7)
 - Browser: Chrome 137.0.0.0
 - OS: macOS
 - Theme: Twenty Twenty-Five 1.2
 - Plugins:
   * Test Reports 1.2.0

 === Steps to Reproduce
 1. Publish at least one post (ex: Hello World!)
 2. Create three draft posts (ex: Sample Post 1, 2, 3)
 3. Select all three draft posts, then Bulk Actions > Edit. Change Status
 to "Published"
 4. When viewing any of the recently published posts, the previous post
 link skips the other posts published at the same time.

 === Expected Results
 1.  ✅ When viewing the recently published posts the previous / next post
 buttons should take you between all 3 of the recently published posts.

 === Actual Results
 1.  ❌ When viewing the recently published posts the previous / next post
 buttons it takes you to the last previous post prior to the recently
 published post.
 2. Moving back from that post only takes you to one of the three
 published.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/8107#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list