I assume that the fl_builder_loop_query_args
hook is from Beaver Builder, which means that the $query_args
are args
passed to the WP_Query
. source
In that case you can push some custom field parameters to the $query_args
to get all the posts with matching meta value.
I think it should work something like this,
function fl_builder_loop_query_args_filter( $query_args ) {
if ( 'dis_board' == $query_args['settings']->id ) {
$query_args['post_type'] = array( 'discussion_board');
$query_args['author'] = get_current_user_id();
$query_args['meta_key'] = 'disc_id'; // the assigned meta key
$query_args['meta_value_num'] = 7020; // value we're looking for
}
return $query_args;
}
add_filter( 'fl_builder_loop_query_args', 'fl_builder_loop_query_args_filter' );
Could test this one and see if it works the way you want?
Related Posts:
- How to hook a filter to catch get_post_meta when alternate a custom field output?
- How to use update_{$meta_type}_metadata filter to modify meta value
- How can I display image metadata?
- How to filter into post meta data before saving
- Explanation for remove_filter used in the below code [closed]
- Filter list by a unique meta value dilemma
- How to remove get_post_metadata using remove_filter inside a class?
- Sorting and limitation with pre_get_posts
- Custom wp_query time filter on meta_value
- Filter for author list in gutenberg core editor
- Excluding posts by meta, and also keeping posts without the meta
- How to add more than one custom metadata as filter on the post list page?
- Hide H1 Title using the_title filter
- Adding an orderby filter, casting postmeta with multiple keys
- Changing WooCommerce Display Price Based on User Role & Category [closed]
- Not able to change wp_title using add_filter
- Advanced Custom Fields and Yoast SEO keyword analysis [closed]
- Insert Custom HTML After Shortcode
- Is there a way to add another row to the tinyMCE kitchen sink toggle?
- What do add_filters() and apply_filter() do?
- SSL certificate for the host could not be verified
- Store source permalink on XMLRPC calls
- What to use instead of the content_save_pre filter?
- How can I customize the wp_list_categories
- How can I reliably and globally disable wptexturize?
- Customise Jetpack Publicize text
- Can’t change a label in woocommerce with the normal filter
- WordPress RSS feed – filter RSS content by custom field value
- What is the filter hook for custom fields content?
- Add classname to the_category() function?
- Filter the URL of next_posts_link & previous_posts_link
- Sensei LMS Hooks to Remove Content
- How to re-enable a filter after disabling with __return_false
- Exclude One Category and its Subcategories using WP_LIST_FILTER
- How to change the blog title with add_filter? details below
- Gutenberg disable the “block” tab in right sidebar
- add_filter to ‘woocommerce_before_main_content’ [closed]
- Editing
- the_content filter – checking the post
- add_filter to apply_filters that exists within class
- Echoing Categories only if they’re a child of a given category
- How do I target a single page to modify the comment form of only that page?
- Adding a title prefix with the the_title filter
- How to removes all instances of thumbnails displayed in my theme?
- Contact Form 7 filter similar to preprocess_comment [closed]
- How to modify an existing meta description?
- Adding TinyMCE buttons without removing plugin buttons?
- How can I include an existing custom sitemaps listing in wp-sitemap.xml?
- Display Externally Retrieved Data within a Custom Template
- Can the wordpress color palettes by changed through Javascript?
- Filter on the_content doesn’t update the content being searched via register_rest_route
- Where to add_filter in theme functions.php?
- tag removed not using a filter
- How to customize the “Insert/edit link” popup box?
- How to filter backend post list showing only posts having a shortcode
- WordPress Image update filter
- How to remove this filter?
- Why does WordPress strip custom HTML that are form elements and theme SVG icons?
- Get current user data
- How can you wrap add_filter with a if is_home() statement?
- How to add attributes to WordPress Admin Sub Menu List Items
- How to combine multiple body classes
- How to replace username with email address in users table
- How to write a filter to remove a form field (WordPress) [closed]
- Why doesn’t this function work when I know that the IP Address is “true”?
- why require – does not load filter
- term_link filter rewrite link only applying half of condition?
- How to change dynamically page title according to variable data?
- Map plugin with proximity search compatible with Buddypress
- Most performant/functional way to add actions/filters?
- Remove tags without a specific meta key from “choose from the most used tags”
- Making an add_filter() call from within an add_filter() call
- automatic title through filter
- Finding actual functions added to hooks and filters
- Buddypress Filter Multiple Activities [closed]
- Filter search posts by post meta?
- How to apply filter on get_the_post_thumbnail()
- How do I check if I can use the allowed_block_types filter?
- Setting the page title in a plugin, but not outside my plugin
- Security question – Display a General Custom Login Error Message
- Action for opening attachment or manipulating all attachment links
- Filter wp_mail based on content type
- Remove the post_content search from WHERE clause (and CONCAT sql function)
- mu-plugins body_class filter not working
- How to apply a filter to everything?
- WP Job Manager – display search results from custom search form in taxonomy-job_listing_category page
- Conditionally (cpt) filter previous and next_post_link
- Post filter Month dropdown at front-end like wordpress backend
- shortcode function outputs multiple anchor tags
- changing size image within the content
- WP Dashboard -> Posts-> Filter by Category -> Form Method Change : Which Hook
- Show child theme for users on specific IP
- Is there a way to overwrite a filter used in canonical.php?
- How do I remove certain HTML elements with specific classes from the feed?
- Sanitizing a custom query’s clauses
- How can I display wp_link_pages before a shortcode, if it is used, or display after content?
- confusion with add_filter
- post->post_content filter
- How to change this WP logo and posts url in block editor?
- Limit total tags in the_content