WordPress.org

Forums

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

  1. drkaos
    Member
    Posted 2 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

    http://wordpress.org/extend/plugins/wordpress-23-related-posts-plugin/

  2. jureham
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,
    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