This doesn’t seem terribly efficient but you could just look up the next/prev posts in the loop used to display the post then output the post titles in the nav calls.
// loop
if ( have_posts() ) : while ( have_posts() ) : the_post();
// ... post display
// next & prev post data
$older = get_previous_post();
$newer = get_next_post();
endwhile; endif;
// pagination
next_posts_link( $older->post_name );
previous_posts_link( $newer->post_name );
Related Posts:
- Should we trust the post globals?
- WordPress Number of Posts Not Changing With posts_per_page
- Looping through posts per category gives same posts for each category
- How to setup a query to output posts by groups of five?
- Exclude current custom post on single post
- First x post with another template then the others
- WordPress loop not working on static front page
- Some doubts about how the loop work (trying debugging it)
- Get current taxonomy and display query accordingly
- Need to display a Jan 1st post as the site’s front page on Jan 1st, and Jan 2nd post as front page on Jan 2nd etc
- Display the latest post from some selected authors
- Advanced Post Display/Pagination/Ordering
- Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?
- How to limit the number of posts that WP_Query gets?
- Print Current Post Index number within Loop
- How to get posts published between a date and today?
- Random sort within an already sorted query
- How set featured posts using checkbox in post edit screen?
- Get first post from wp_query
- Do we still need to include a “if (have_posts())” in templates?
- WP_Query: Why is sticky post not first item in loop?
- how to get a different html for odd/even posts?
- Query *only* sticky posts
- Display all posts from specific categories on a page
- rewind_posts() – what actually the use of it, and where using is required or preferred?
- Skip post in loop and mixin later
- How to show list of posts by author and category?
- Override the default number of posts to show for a single loop?
- get comments and get posts in loop
- How do I reorder (pop and push) items from WP_Query?
- How to exclude latest x posts from a paginated query?
- How to know if get_posts() failed?
- Display content from a specific category
- Using $wpdb to query posts with meta value containing current post_id
- Query posts from current year
- Reverse chronology of post listing
- Why do I need to use The Loop on pages (inside page.php etc)?
- posts page – different lengths of excerpt
- how to display full post with pagination on home page
- I have over 4000 posts, will querying some of them cause performance issues?
- Duplicate posts
- Count singular post views automatically
- How to show posts rank based on custom field value
- Find most recent authors
- This AJAX Code Doesn’t Work – Looking for elegant solution
- Display All Sticky Post Before Regular Post
- Cannot access current post’s ID in custom plugin
- Can’t show comments count per post outside loop
- Get the author of the latest revision
- How do I create Comma Separated list of attached image ids?
- How to add posts to wp_query result?
- How to have different content in the loop and single
- Trying to put an array into ‘post__in’ => array() query not working
- Specific loop in Shortcode
- Strange switch_to_blog() issue
- Show a list of recently viewed posts to a user
- Multiple loops in same page, without duplicate content
- loop not displaying posts on custom template page
- Repost post on specific date every year
- How to use alternate post layout at key points in post loop?
- Alternate custom content in the loop
- Order post by year DESC and month ASC
- Showing random content / pictures from earlier posts in a sticky post?
- Search widget breaks when using multiple loops?
- How to Display Post View Count
- Should ‘setup_postdata()’ be reset with ‘wp_reset_postdata()’?
- How can I display a specific user’s first published post?
- Query All users that has post
- Displaying the number of posts in a custom loop (without including the number of posts of a loop below)?
- wp_enqueue_media() slows down my WP site
- Display Latest Post from all Categories
- How can I get all posts data from within a paginated search result?
- Auto Refresh Post List after X seconds
- The correct way to call posts with ajax
- Search query – exact post title match
- custom wordpress post loop – hide iframe content
- Double count view in archive.php
- Sorting posts alphabetical that have single digits
- Divide Loop Into Days & Categories
- Query posts from different categories in multisite
- Converting multiple loops into one single loop with pagination
- Display posts with comments closed, with pagination?
- Check if post exists
- Group posts by year in loop
- posts_per_page doesnt work
- Sorting posts according to view counts not working
- How would I get 1 latest post from a query for 5 posts?
- Display page content AFTER a loop of posts
- While in “the loop”, detect if a post is the most recent
- Only display posts after current date
- Get posts by multiple ID’s (query)
- How to start with post number x?
- Exclude posts with empty post_content in wp_query
- Only display a certain number of posts, dependent on how many posts there are available in a query
- Alternating post layout
- Check to see if specific loop has less than certain amount of posts
- Different style for most recent article
- Contact form 7 post loop [closed]
- Differentiate between posts and pages in search results
- Related posts loop based on tags AND categories doesn’t work without at least one tag assigned