Closed rsm0128 closed 1 year ago
@drewbaker
By default, inSameParent
is true for hierarchical and false for non-hierarchical post types.
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.
Closing as I did this using a more simplified approach in a new PR.
Fix #44
inSameParent
arg to the previous and next post|page|cpt.