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
1answer
104 views

Showing the next post's title, even if it's an unpublished post

At the bottom of each post I need to either: Offer a link to the next post (if the next post is published); or Display the title of the next post with the date it will be published (if it's a future ...
0
votes
2answers
301 views

Ambrosite Next/Previous Post Link Plus or WP next_post_link to cycle through top level category

I have installed Ambrosite Next/Previous Post Link Plus and I'm not sure how to configure it to achieve what I'm looking for. I have a post category like below: Parent category -> Sub category -> ...
0
votes
1answer
511 views

How to get Next/previous_post_link to go through articles in top parent category

I have a magazine format where a parent category is an issue, sub categories are the sections and the articles go into their respective sections. When viewing an article in a magazine, I would like to ...
11
votes
5answers
3k views

Can the Next/Prev Post links be ordered by menu order or by a meta key?

I have a series of posts that are ordered by a meta_key value. They could also be arranged by menu order, if necessary. The next/prev post links (generated by next_post_link, previous_post_link, or ...
0
votes
1answer
210 views

Change next_post and previous_link to navigate throught parent categories only

I have this unchanged code from template-tags.php which links through all of the posts on the site. However I would like to restrict it so that it only links through the articles which are in the same ...
1
vote
3answers
171 views

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 ...
1
vote
2answers
174 views

Pass taxanomy parameters to next_post_link()?

I am trying to find out if it is possible to pass certain parameters to next_post_link() and previous_post_link() to make it only show other custom posts that have the same custom taxonomy values ...
-1
votes
1answer
318 views

Retrieving next_post_link() and previous_post_link() in functions.php

I'm trying to create a function in functions.php that includes the next_post_link() and previous_post_link() without success. It returns empty. My guess is that these don't use the post ID... So what ...
1
vote
1answer
208 views

Get Adjacent Post By Tag

In this answer -- How to Get Next or Previous Post in a Specific Tag? -- a working function is provided to generate "next/prev" links by tag rather than category. How could one make this so that you ...
0
votes
1answer
128 views

navigation among single posts

In the twentyeleven theme each single post page has two navigation links which point to previous and next post, irrespective of the search made by the user. That is, the next post is the successive ...
1
vote
0answers
265 views

Post in Multiple Categories to stay in current category (permalink, next previous post link)

I guess this has been mentioned before, but after 2 days of browsing i haven't find a complete solution. Maybe someone has come across this problem before? I'm building a designer portfolio where ...
0
votes
2answers
1k views

Next/Previous links doesn't work in the same category

I created a category and call it "Blog". Then I created some posts and assign "Blog" as category for the posts. So I'm trying to go to previous/next into the same category and doesn't work. Here is my ...
0
votes
1answer
433 views

get rid of the arrow in previous_post_link?

How can I hide or disable this « sign in front of previous_post_link? I can't find it anywhere - it only shows up on the generated page. This is the code I am using: <?php $nextPost ...
0
votes
0answers
24 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
897 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
370 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); ...
1
vote
4answers
2k 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 add next and previous links on its single page file which is single-portfolio.php. When ...
2
votes
2answers
3k 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
925 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
3k 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
293 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
724 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
108 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
97 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
352 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
483 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
966 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
713 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
762 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
887 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
815 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 ...
3
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
932 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
3k 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
719 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
605 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
549 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
603 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 ...
5
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 ...
5
votes
5answers
4k views

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

For some reason a title attribute is not appended to next_post_link and prev_post_link calls in WordPress. How can I add one?
3
votes
2answers
854 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 ...
3
votes
2answers
1k 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
533 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 ...