You’re very close to it just need to to modify your code little bit. See I’ve update code for you.
function my_super_filer_function2($query_args){
global $post;
$post_author = $post->post_author;
$query_args['author'] = $post_author;
$query_args['post_status'] = array('publish', 'future');
$query_args['meta_query'] = array(
array(
'key' => 'zobrazitnatridy',
'value' => 'Ne',
'compare' => '!='
)
);
return $query_args;
}
add_filter('my_super_filter2', 'my_super_filer_function2');
Related Posts:
- WordPress Search Custom Meta Field Only
- Query Posts Via WordPress URL
- Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
- Using meta query (‘meta_query’) with a search query (‘s’)
- Is there any action filter/hook for validating a custom field before publishing the post?
- ORDER BY custom field value
- Filter WP_Query for posts having a certain meta-value
- Can I query custom meta data through WP_Query
- Add custom fields to search
- SELECT max(meta_value) FROM wp_postmeta WHERE meta_key=’price’… stops working when value is over 999
- Apply the_content filter to a custom field with multiple values
- Matching Serialized Arrays with meta_query
- Meta Query with AND & OR?
- Pass all custom fields through the same filter on post load?
- Filter results with custom field values and dropdown
- Archive sorting functions by custom fields (front-end)
- How to make an meta_query optional?
- Trying to perform complex custom field query with order by set to field value
- Is there a way to do multiple ordering on a multiple meta_query?
- Change content before writing to database
- Compare meta_query decimals not working right
- Ordering posts by anniversary using only day and month
- Calling Specific Pages with wp query Part II
- How do I assign this filter to a variable? (Appending php & markup to the_content)
- Loop through two different sets of custom fields
- Using custom fields in a filter hook
- Slow meta query with multi meta keys
- Add an advert every nth Paragraph
- Using OR in WP_Query negates the “NOT EXISTS” compare
- How can I query on the year part of a complete date in a custom field?
- How can I combine meta_query queries?
- Displaying posts with only upcoming dates according their custom field date value
- How to filter a dd/mm/yyyy date from a custom field in a query
- Difference between ‘LIKE’ and ‘IN’ in meta queries
- Sorting posts by multiple values, combined
- meta_value_num sort glitch
- WP_Query display next custom post from today’s date
- Which is best in the following scenario : post_meta vs custom table vs parent/child posts
- WP_Meta_Query causing long-running MySQL queries
- Force hide custom field metaboxes
- Saving custom profile fields
- Sorting posts by custom fields in meta_query
- meta_query for a string inside a meta field containing a comma-separated list
- Order by custom field value not working for acf date field
- Update posts after populating ACF field value [closed]
- How to validate custom field on lost password form before the user id field?
- Complex WP_User_Query call fails on production server
- Meta query with timestamp using WP_query
- Orderby custom field meta value ASC and then by date DESC
- How make a custom search on backend in WordPress without plugin?
- filtering custom post types via meta data drop down
- global function to apply filter to custom field
- How to add a new meta key and assign timestamp to posts
- Get content from pages with same meta_key from Database
- WP 3.1 meta_query for multiple custom field values
- How to order posts by one custom field and filter them by another one?
- How do I have WP_Query match posts based on search parameter OR meta fields? (rather than search parameters AND meta fields)?
- Get posts with same meta value as current post
- Filter multiple custom fields Values with Check boxes
- Alter main archive, to show posts with meta as last
- How to get categories with posts by custom field value?
- Meta Query returns wrong number of posts
- Change order of posts
- Meta Query And/Or
- Use meta_query to get title of associated post
- Meta query with multiple custom fields for archives page ordering problem
- filter custom field values $min $max
- Ordering posts by custom field named “date” in backend
- Get Data From wp_sitemeta for Multisite network
- Unique meta_key with array value vs repeated meta_key with single values
- get posts where a custom field contains a text
- WP Query – Is this correct?
- How to Wrote Simple Calculations by Using Custom Fields in Loop?
- How can I do a variable for meta_query?
- Avoiding ACF get_field and returning to core WordPress function
- ORDER BY custom field value out of where clause
- Best filter to use for modifying custom fields on a post?
- comment meta_query for keys that aren’t yet set
- Query post by date (stored custom field meta as yyyymmdd) and differentiate across 12 months
- How to display childrens custom fields?
- ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?
- Access ACF fields within custom preview function?
- change order of images attached to post
- Sort posts by clicks on download button
- Meta_query ‘compare’ => ‘LIKE’ not working?
- Diamond question mark in text after migrating content
- tax query between operator like
- Let Users Filter Posts by Custom Fields
- Custom Theme Fields in Settings Menu – apply filters to one of those fields?
- Footnotes in custom fields
- How to change permalink on headlines in rss feeds?
- How to change order of posts in admin
- Best way to sort estates and query them (for rent? yes/no. contains office space? yes/no)?
- Is it possible to compare the current time with a custom “start” and “end date
- How to query posts by month based on date custom field?
- How can I modify my meta_query to work with prices that are stored in the database that contain dollar signs and commas?
- Filter or order based on custom field
- meta_query weird behaviour, static int will work, but not user data
- Need to search a custom field (ingredients, one long string per post), but want it to allow phrases/non-exact matches
- Making WP_Query limit results by date before today where date is a meta_query