changing posts_where string for custom post type
-
hello,
I am using a custom post type “ticket” and I am showing 10 on a page. At the bottom of the page I have thenext_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'”string(97)
“
WHERE
p.post_date < ‘2011-06-06 14:59:36’
AND
p.post_type = ‘page’ AND
p.post_status = ‘publish’ ”string(97) “
WHERE
p.post_date > ‘2011-06-06 14:59:36’
AND
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?
- The topic ‘changing posts_where string for custom post type’ is closed to new replies.