WordPress.org

Ready to get started?Download WordPress

Forums

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

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

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

  2. jureham
    Member
    Plugin Author

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

About this Topic