Grow your CSS skills. Land your dream job.

next_post_link based on custom field value

  • # July 19, 2010 at 1:06 pm

    Hello Tricksters,

    I’m looking for a way to show the next_post_link() that has a custom field key/value pair in WordPress. What I’d like to do is exclude posts that don’t have a custom field "link/true".

    Maybe next_post_link() isn’t the thing I want in this case, but it’s worked for me up until now.

    Any thoughts?

    -J

    # July 19, 2010 at 1:37 pm

    You can see an example here: http://dev.jacobdubail.com/portfolio/sh … m-organics

    The links are at the bottom of the post. The posts in that category are in the left sidebar. The whited out posts don’t have the custom field key/value pair. I’d like to skip them in the navigation at the bottom of the page.

    Someone pointed me to http://codex.wordpress.org/Function_Reference/get_posts, but I can’t quite get it tweaked to the point I like.

    Thanks!
    -J

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".