fuxt-backend icon indicating copy to clipboard operation
fuxt-backend copied to clipboard

Fix 44

Open rsm0128 opened this issue 2 years ago • 2 comments

Fix #44

  • Added inSameParent arg to the previous and next post|page|cpt.
  • Updated logic to determine next|previous post.

rsm0128 avatar Dec 01 '22 14:12 rsm0128

@drewbaker By default, inSameParent is true for hierarchical and false for non-hierarchical post types.

rsm0128 avatar Dec 01 '22 14:12 rsm0128

I'm very nervous about the use of $wpdb in this... There is a lot of code here and will be hard to maintain this. I get the need to avoid getting all siblings to figure out what's next, and the performance issues of that, but in reality over years of using this code, it worked fine actually.

I think I'd rather just re-write this to have a get_adjacent_page() and get_adjacent_post() function that was much simpler and mapped to wp_query() args...

Let me think about this some more before we continue.

drewbaker avatar Dec 09 '22 02:12 drewbaker

Closing as I did this using a more simplified approach in a new PR.

https://github.com/funkhaus/fuxt-backend/pull/51

drewbaker avatar Feb 10 '23 12:02 drewbaker