WordPress Related Posts
[resolved] Exclude custom post types (2 posts)

  1. drkaos
    Posted 3 years ago #

    Hi there,

    Your plugin works great, but I'm not able to exclude some custom post types I don't want them to appear as related posts (but not all), how can I exclude them?

    I assume it has to be at the function wp_rp_should_exclude(), but I'm not sure what to modify.

    Best regards


  2. jureham
    Plugin Author

    Posted 3 years ago #

    wp_rp_should_exclude() is used for excluding categories.
    To exclude custom post types you'll have to modify line 51 in wp_related_posts.php and line 19 in recommendations.php.

    We might add and option to exclude post types in the future version, but for now this is the only way.

    Best, Jure

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Related Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic