Ready to get started?Download WordPress


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

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

About this Topic