Getting the Next and Previous Posts Titles in the Sidebar?
The existing WordPress functions are only for displaying one previous or next post. I quickly wrote functions to display any number of posts. Paste the following in your theme functions.php file: function custom_get_adjacent_posts( $in_same_cat = false, $previous = true, $limit = 2 ) { global $post, $wpdb; $op = $previous ? ‘<‘ : ‘>’; if … Read more