WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Better Related Content] How to exclude Privately Published post? (2 posts)

  1. derci
    Member
    Posted 3 years ago #

    Hi all,

    I found that the Better Related Content Plugin by Nicolas Kuttler is pretty among the best among all other "related post" plugin.

    However, it also show up some Privately Published post in the auto-gen result (i.e. Status: Privately Published, Visibility: Private)

    What should I do to exclude the Privately Published post in the result?

    Many Thanks!

  2. derci
    Member
    Posted 3 years ago #

    Hi all

    How can I exclude those Privately Published post from the related post result?

    In the scorer.php

    Line 300, I changed to:

    WHERE ( post_status='publish')

    from:

    WHERE ( post_status='publish' OR post_status = 'private' )

    And Line 463 I changed to:

    AND ({$prefix}posts.post_status = 'publish')

    from:

    AND ({$prefix}posts.post_status = 'publish' OR {$prefix}posts.post_status = 'private')

    But it is still showing the private posts. What should I do?

    Many Thanks in advance.

    Plugin: http://wordpress.org/extend/plugins/better-related/

Topic Closed

This topic has been closed to new replies.

About this Topic