0

I am new to php. I have a wordpress site in which I have setup a custom field show_post of type True / False.

I want to use previous_post_link and next_post_link, to only showing posts that have the custom field show_post set as true.

I think I need to use get_{$adjacent}_post_where to add on sql which would return the next or previous post where show_post = true. I can then pass the link for this post to either of the previous_post_link and next_post_link functions.

Could someone assist me on how to code this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.