Used on single post permalink, this template tag displays a link to the next post which exists in chronological order from the current post. This tag must be used in The Loop.

learn more… | top users | synonyms

0
votes
0answers
21 views

How to show Next/Previous within the same Category? [duplicate]

Possible Duplicate: Previous/Next Post Within the Category? I got this code from a website. http://wordpress.mcdspot.com/2010/06/02/stay-in-category/ <div class="navigation"> ...
0
votes
1answer
565 views

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 ...
0
votes
1answer
290 views

Next Prev Post link rendering current post thumbnail

i am using below code which should render next and previous post thumbnail but it is showing the current post thumbnail in Custom Post Type single page <?php $prevpost = get_previous_post(true); ...
0
votes
3answers
1k views

next and previous link in custom post type in the same taxonomy term

I have a custom post type name->('portfolio'), with a taxonomy name ('portfolio_category'). what i want is to put next and previous link on its single page file which is single-portfolio.php. when i ...
2
votes
1answer
2k views

Get Previous & Next posts by Post ID

How can I go about getting the previous and next posts from outside the loop? Everything I try to do aside from the custom SELECT query (using get_posts or WP_Query) breaks stuff further down the ...
0
votes
2answers
838 views

query_posts pagination will always show identical content

Anyone here see why my pagination won't work? I can get "previous page" to show up, but when navigating to "page-2", the content will stay identical to the content on "page-1". <?php /* Template ...
1
vote
6answers
2k views

Prev/Next child navigation for current page?

How can I get a Previous / Next navigation that only navigates the child pages of the current page? By that i mean url.com/page/child1, url.com/page/child2 and so on.. I've been searching around ...
0
votes
1answer
248 views

How do I display a greyed out next_post_link when there is no next post

Wordpress hides the next and previous post links if there are none, but for the sake of visual consistency I'd like to serve up a greyed out version of the link when there is no next or previous post. ...
-1
votes
1answer
569 views

how to implement next/prev within category archive?

I click on a link in my WP site to open a category archive. I see a list of posts for that category. I click on the permalink of one of those posts to see the full post. at the top of the window are ...
0
votes
1answer
98 views

grab neighboring content in a query

I'm grabbing a post based on a querystring parameter. How can I get the neighboring posts for a previous and next button? This will get tricky when you're on the first/last items. Here is how I'm ...
1
vote
1answer
91 views

Is it possible to skip certain specified pages when using < prev and next > links?

thanks for taking a minute to read my question. I've done some googling and I can't seem to find the answer to this question anywhere. Forgive me if it's somewhere here on stack exchange already. ...
0
votes
2answers
2k views

next_posts_link and previous_posts_link problem

Below is the code from my author.php file. The problem is that next_posts_link and previous_posts_link only generate links based on the number of posts in the blog authored by the author in question, ...
1
vote
1answer
230 views

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 |
1
vote
1answer
453 views

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: ...
0
votes
1answer
689 views

excluded_categories parameter in next_post_link() behaving unexpectedly

I have a Wordpress template with a single.php page. The page has "next" and "previous" arrows to allow navigating through all posts. I want to exclude posts from some categories from being included in ...
0
votes
1answer
1k views

next_post_link / previous_post_link not working with WP_Query

I am trying to add next and previous page buttons to my template, but when I try to use either next_post_link or previous_post_link, it just does not work. Could it be because I am using WP_Query? ...
0
votes
1answer
538 views

how to add previous and next link for the posts?

i would like to know how to link the next and previous post of the current post with in that category..i tried lotta plugins put nothing worked out and I am a noob in WP so kindly help me
0
votes
1answer
729 views

WP_Query and pagination AGAIN?

I am using the WP_Query class to retrieve some posts according to variables set in url. All working well until we get to paging. The second page (though having posts - tested it by making paged => 2) ...
0
votes
2answers
578 views

pagination links not displaying

I'm unable to get my 'next_posts_link()' and 'previous_posts_link()' to display. So far I've tried the standard first debug by deactivating all plugins and clearing the cache, I've also tried removing ...
0
votes
1answer
727 views

Next / Previous Posts not working

So I have a page that display posts from a certain category. If that is the category, its outputs one way, otherwise, it outputs another. The problem is, the pagination is only working on the ...
2
votes
2answers
1k views

How to use next_post_link and previous_post_link on single posts in search results

I'm using next_post_link and previous_post_link on my single post templates, to navigate from post to post, so far so good. But if I do a search and click on a result post, then the next_post_link ...
0
votes
1answer
773 views

Featured Image Link to next post?

Hello i wonder if anyone knows this is possible? A post featured image click to view next post...? For example.. <a href="next-post"> <?php the_post_thumbnail('post-thumbnails'); ?> ...
1
vote
2answers
2k views

How to show link to next posts in single.php

I can't get get_next_posts_link to work. shouldn't his code work? <?php echo get_next_posts_link(); ?> Well, I am trying to get next 5 posts, any idea how? EDIT: Accroding to: <?php ...
1
vote
2answers
619 views

Why do next pages load the same content rather then older articles?

For some reason, the 'previous posts' and 'next posts' on the homepage do not load previous posts, but rather the same posts that were on the main page. Why is that? I don't even know where to start ...
1
vote
1answer
1k views

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 ...
0
votes
2answers
554 views

Disable “previous link” in first post and “next link” in last post

how can I disable "previous link" in first post and "next link" in last post? thank you
4
votes
3answers
1k views

is it possible to get next_post_link

I have come across a problem whilst using the next_post_link() function. It seems that this function automatically echo's, for position reasons I need this to just return the link. Is there any ...
0
votes
2answers
506 views

Making next_posts_link(); return posts by month

I'm building a site for a magazine using WP and am needing to display a month of posts at a time. How would I make the next_posts_link(); and previous_posts_link(); functions return results, shorted ...
2
votes
2answers
544 views

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 ...
4
votes
3answers
1k views

How to Get Next or Previous Post in a Specific Tag?

I'm trying to create links to the next and previous posts within a specific tag (on the post page itself), but I can't seem to find a plugin or source that does this. I want to be able to something ...
4
votes
7answers
3k views

How can i add title attributes to next and previous post link functions

It's a pretty simple question really! For some reason a title attribute is not appended to next_post_link and prev_post_link calls in Wordpress. Anyone got any tips on this? Thanks
2
votes
2answers
637 views

Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation

I really need some help, I dont know where else to turn with this request. I'd like to add a shortcode to one of my posts. The template tags get_next_post() and get_previous will not work for me since ...
3
votes
1answer
1k views

Why is previous_post_link and next_post_link working outside of the Loop?

This is my single.php file: I'm using previous_post_link(); and next_post_link();. In the Worpress codex it says that it only works inside the loop. <?php /** * The Template for displaying all ...
2
votes
3answers
2k views

Thumbnail (featured image) of next and previous post is not being properly displayed!

I'm using this code to display the thumbnail (featured picture) of the previous and next post (a custom post type called Blocks). (A custom loop) <?php // Create and run custom loop ...
1
vote
2answers
902 views

adding custom fields to next and previous post link

Im trying to make my next and previous post buttons display my custom field but for some reason it doesnt display the custom field its just blank. Heres my code. <div id="next-prev-links"> ...
2
votes
1answer
477 views

Getattachment next and previous by author only

Im trying to get the next and previous attachment by the user its 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 ...
2
votes
3answers
2k views

get next next post in single.php

I really need your help. in my single.php I had to get the next post in the same category (which i already have by: $in_same_cat = true; $excluded_categories = ''; $previous = false; $next_post ...
1
vote
1answer
777 views

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()?