get_previous_post in same categories
get_previous_post uses get_adjacent_post() which has a bunch of filter hooks you can use but a much simpler approach would be to create your own function, something like this: // Create a new filtering function that will add our where clause to the query function date_filter_where( $where=”” ) { global $post; $where .= ” AND post_date … Read more