- This topic has 1 reply, 2 voices, and was last updated 4 years ago by .
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Private posts shown in search results
Tagged: private posts
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.
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.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
We also use cookies to store items in your cart as well as allowing your to login on the site.
You can adjust all of your cookie settings by navigating the tabs on the left hand side.
By continuing to use this site, you also agree to our Privacy Policy.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
*Other cookies used for logging in and cart functions will only be used when you use those features and cannot be disabled.
If you disable these cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
More information about our Cookie Policy