3711 posts Ruben Bristian
  • Sells items exclusively on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
+10 more
KrownThemes says

Please give me a hand here.. I’ve struggled with this in the last hours and i couldn’t find anything good on Google either. I have to make one of two things .. i don’t need both, i just need to one, but none seem to be working.

Case A: I need to get the next_post_link and exclude a category type
I’m working with custom posts, and no matter what i try, if i put a taxonomy id inside that field, it excludes all of my posts. I get nothing.. I’ve also tried with get_adjacent_post but it didn’t work. Can i even filter the next custom post by a category id?

Case B: I need to get the meta info of the next post Again, i’ve tried to get_post_meta by giving the next post’s id, and it doesn’t work. Can i even get it? Or should i figure out a Case C? :D

335 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
cosmincotor says

Maybe this function will be helpful – get_adjacent_post()

3711 posts Ruben Bristian
  • Sells items exclusively on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
+10 more
KrownThemes says

Please read the entire post. I’ve already used it and it doesn’t work.

get_adjacent_post(false, ’’, false) – returns the next post;
get_adjacent_post(false, ‘23’, false) – returns nothing.

335 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
cosmincotor says

Oops :P sorry, I missed that part.

2196 posts
  • Located in Europe
  • Made it to the Authors' Hall of Fame
  • Had an item featured on Envato Market
  • Participated in a focus group or interview to improve the user experience on Envato Market
+10 more
revaxarts says

Always dig into the core files if something doesn’t work. I’ve had a similar problem in the past and found a solution: http://themeforest.net/forums/thread/next_post_link-with-custom-post-types/65676

Hope that helps

3711 posts Ruben Bristian
  • Sells items exclusively on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
+10 more
KrownThemes says

Thanks for link.. However, i’ve followed a route C, which didn’t involve the next post..

2468 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $100+ on Envato Market
  • Has referred 100+ members
  • Has been a beta tester for an Envato feature
+2 more
digitalimpact says

Thanks for link.. However, i’ve followed a route C, which didn’t involve the next post..

Why not post it? Maybe someone lands here searching for the exact same thing :)

3711 posts Ruben Bristian
  • Sells items exclusively on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
+10 more
KrownThemes says

I didn’t solve the issue. I’ve just made something else that has nothing to do with the issue, so it’s irrelevant to post it :)

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by