Articles of next post link

next_post_link() on custom menu structure

In a blog, I am using next_post_link() and prev_post_link() extensively on posts. I also have a number of pages that I show in a WP3 menu. They are organized in topics and sub-topics e.g. like so: Home About – Subpage 1 – Subpage 2 – Subpage 3 Contact I would like to set up a […]

“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 |

How do I insert CSS into a function?

I have a custom function which allows users to choose between next/previous links and pagination and I’m attempting to add CSS classes to the next/previous links. I’ve tried this multiple ways and keep crashing my theme. How do I insert CSS classes into the previous and next link? // Pagination function my_theme_navigation() { global $shortname; […]

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 […]