Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
'Author' in the WP context can refer to two different things: the person who has written a certain post/page or the role a user has.
0
votes
1
answer
972
views
Query filter on custom post by current author in post widget for elementor query id
Now, I want to apply also some filters in particular I want to show only posts in a particular status (ie, "draft") and those created ("post author") by the user logged in. … this is the case:
add_action( 'elementor/query/my_query_by_post_status', function( $query ) {
$query->set( 'post_status', ['draft'] );
} );
But I don't know how to add a condition to say "only for author …