Title: Exclude custom post types
Last modified: August 20, 2016

---

# Exclude custom post types

 *  Resolved [Marc](https://wordpress.org/support/users/drkaos/)
 * (@drkaos)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/exclude-custom-post-types/)
 * 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/](http://wordpress.org/extend/plugins/wordpress-23-related-posts-plugin/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [jureham](https://wordpress.org/support/users/jureham/)
 * (@jureham)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/exclude-custom-post-types/#post-3301816)
 * 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

Viewing 1 replies (of 1 total)

The topic ‘Exclude custom post types’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-23-related-posts-plugin_7b9a7c.
   svg)
 * [WordPress Related Posts](https://wordpress.org/plugins/wordpress-23-related-posts-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-23-related-posts-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-23-related-posts-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-23-related-posts-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-23-related-posts-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-23-related-posts-plugin/reviews/)

## Tags

 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)
 * [exclude](https://wordpress.org/support/topic-tag/exclude/)

 * 1 reply
 * 2 participants
 * Last reply from: [jureham](https://wordpress.org/support/users/jureham/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/exclude-custom-post-types/#post-3301816)
 * Status: resolved