Forums Forums Search & Filter Pro Private posts shown in search results

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Anonymous
    #266417

    Hi,
    I have an issue with a search form which shows private posts as result of a query, even though private posts are unchecked in the settings conditions for the Search Form.
    Theoretically, private posts should not be seen by logged out users (as per the WordPress documentation) but with this Search Form, they are visible and even openable.
    How can I hide them form the search results ?
    Thanks in advance.

    Trevor
    #266466

    Generally, with our plugin, private posts should not show in the search results regardless of logged in status, unless in the Posts tab you have Private enabled.

    So, another plugin must be modifying how WordPress handles private posts. So, if you have a user role plugin of some sort, try deactivating it and see if the private posts disappear from the results?

    If it does, obviously reactivate that plugin, but then you would need to modify our query using this filter:

    https://searchandfilter.com/documentation/action-filter-reference/#edit-query-arguments

    But, it rather depends what that user plugin is doing. If it is modifying the post_status response in wp_query, that may be an insurmountable issue unless you use a custom field condition to hide/show the posts.

Viewing 2 posts - 1 through 2 (of 2 total)