Articles of previous post link

“next_posts_link” and “previous_posts_link” display me NOTHING

I’m trying to add links “Previous Post” and “Next Post” in my single.php file without success because previous_posts_link and next_posts_link dont return anything. Honestly I do not know where in the loop put these buttons. Thanks. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class=”post-content”> <?php the_title(); the_content(); ?> […]

previous_post_link() next_post_link() arrow position

How can I make the arrow as part of the link please? <?php next_post_link(‘%link &rarr;’); ?> The output of above will be | <a href=”nextPostLink”>NextPostTitle<a> arrow |

Showing Thumbnail from Previous and Next Posts

Is there a simple way to use the post thumbnail when calling previous_post_link() and next_post_link()?

connect last post with first post

next/prev from my first to last and the other way around cant find a solution for that i am using this code for next <?php next_post_link(‘%link’,'<img src=”img-location”/>’); ?> and this for prev <?php previous_post_link(‘%link’,'<img src=”img-location”/>’); ?> here is the first post

Next and Previous links on a single taxonomy page only link to same term

I am currently using toolbox as a parent theme and have created a template file called single-projects.php where all posts of the custom post type ‘projects’ are shown. The previous and next buttons work well but they show the next posts in the same ‘projects’ post type and I need them to be in the […]

specify meta_key / meta_value condition for prev_post_link and next_post_link

I’ve got a custom post type (CPT) called event. Every event has got an associated meta_key called event_date. I want to make sure that events with empty event_date won’t appear in my list of all events and in the prev/next event navigation when viewing a single event. I also want to order events by the […]

Get attachment next and previous by author only

I’m trying to get the next and previous attachment by the user it’s currently displaying, this is what I have and it works great except it gets all of the attachments instead of just the ones from a specific user. <p> <?php $attachment_size = apply_filters( ‘twentyten_attachment_size’, 900 ); echo wp_get_attachment_image($post->ID, array( $attachment_size, 9999) ); // […]

previous / next post with thumbnail

I’ve got another question regarding next / previous post. At the moment I’m working on our portfolio with several items. Each item is a post with a title, category & featured image. When viewing an item there are 4 next/previous posts. How do I display the next 2 and previous 2? And If the next […]

next_post_link and previous_post_link in custom post type single page, in same non-custom category

I have a custom post type “realisation”, for which I’ve made a file single-realisation.php. These posts use the non-custom taxonomy “category”. In this page, I use the next_post_link() and previous_post_link() functions, with the in_same_term parameter set to TRUE. I’ve also tried to set the other parameters to ‘ ‘ and ‘category’ (as the site was […]

Previous/Next Post Within the Category?

I want to add a code in my theme to show a Next/Previous link below the post but within the same category. I Don’t need a thumbnail but if possible I would appreciated, still that’s not important right now. Right now I just want to insert a code(s) to one of my PHP scripts so […]