Support » Requests and Feedback » [Plugin: Yet Another Related Posts Plugin] Feature request – disable on a per post basis
7 years, 10 months ago
I’d really like the ability to disable related posts on a per post basis when composing a post.
@phototristan – this can be done in your theme… just look for some particular metadata and execute related_posts() if that data is there, and don’t execute it if it isn’t there… that way you can switch it on and off.
7 years, 8 months ago
Just found this and I’m not really clear on what you’re saying.
Where is this metadata located in the theme? I just want to disable on a specific post, not on the rest of the site.
Will it work by setting up a custom field with a false value?
I tried setting up a custom field with name related_posts and a false value but RP is still showing.
7 years, 7 months ago
@willard97 – you’re right on track. Just pick some custom field name, set it to false, say, then display the related posts using code like:
if (get_post_custom()[‘show_related_posts’] !== false)
More info on custom fields are here: http://codex.wordpress.org/Custom_Fields