Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Do not want so show password protected posts
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 2 months, 2 weeks ago.
- AuthorPosts
- March 1, 2022 at 5:34 pm #36966
Hello
In the ‘Search Instance – NEW Main’ – I don’t want to show password protected posts in the results but I have turned ‘Off’ the ‘Search and return password protected posts?’ item under ‘General Options – sources’ which does not work as the password protected posts still show up. We are using WishList member plugin.
I have deleted cache but this does not work.
See the image here: https://imgur.com/a/hVgLRt1
which shows duplicate Posts – the top one of each is an ‘open’ Post and the 2nd one is a ‘Password Protected Post.Thanks Francis
March 2, 2022 at 2:05 pm #36982Hi Francis,
Thank you for the details, it helps a lot!
I checked both posts, but they are not password protected, as you can see it on the editor: https://i.imgur.com/3FHhBfB.png
Both posts are publicly visible by WordPress defaults. 3rd party plugins may use different methods for password protection, but that will not work.I usually try to recommend some custom code, but for that I need some more information. If there is a method within the plugin, which we can use to determine if the current user has access to the given post by ID – any function, class method etc.. – then I can recommend a small custom code to remove the unwanted results programmatically.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 3, 2022 at 3:58 pm #36993Hi Ernest
OK I’m not sure what WishLIst Member use to protect the Posts. I can try to ask their support.
Alternatively is there a way to Exclude a certain category from being included in the results? I could then allocate that category to relevant Posts? But we do have many 100s of Posts and a big database so don’t want to impact too much on performance.March 3, 2022 at 4:55 pm #36996You can ask of course, but the category solution is much better. You can of course exclude the items by category. That way not custom coding is needed, and everything will work natively.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.