Hey guys!
I have a doubt, on post_status parameter of the WP_Query class the default value is‘ publish ‘, but if the user is logged in,‘ private ‘is added, see:
https://developer.wordpress.org/reference/classes/wp_query/#status-parameters
but the elasticpress when on perform query only adds the private status if the request is made through an administrative page and if the user is logged in, see here:
https://github.com/10up/ElasticPress/blob/master/includes/classes/Indexable/Post/Post.php#L1232
any special reason for having this difference?
Thanks!!
Hey @vnmedeiros ,
I think you are right! I did a search with and without elasticpress.
Without, I get some results when looking for a private post. With EP enabled, I get no results.
I'll craft a PR for this.
Hi @vnmedeiros ,
I made https://github.com/10up/ElasticPress/pull/1813 to address this. Could you give it a try see if it solves the issue for you?
Hi @oscarssanchez
cool!
I'll test, thank very much!