get_next_post with custom post_type
-
Hi
I’ve got a scroller which uses ajax to load in the next or previous post but for a custom post_type. I want to use the loop to find the slugs of these posts to use as data attributes in my html eg. data-newer=’newer-post’
I would have used:
$newer = get_next_post();
$older = get_previous_post();but these don’t seem to work with my post_type.
Anyone know how to do this?
Cheers
A
- The topic ‘get_next_post with custom post_type’ is closed to new replies.