I am using a custom post type "ticket" and I am showing 10 on a page. At the bottom of the page I have the
next_posts_link('Next Tickets »');
call for the next tickets page. Unfortunately it returns the same tickets.
I tried to use $query_strings and $wp_query, but it too returns the same entries.
if I use the filter hook posts_where
add_filter( 'posts_where', 'stm_ticket_get_previous_next_post_where');
I get the following date from the where clause:
AND (wp_posts.ID = '879')
AND wp_posts.post_type = 'page'"
p.post_date < '2011-06-06 14:59:36'
p.post_type = 'page' AND
p.post_status = 'publish' "
p.post_date > '2011-06-06 14:59:36'
p.post_type = 'page' AND p.post_status = 'publish' "
How I can change it so that it returns the custom posts type ticket and to the next entries?