No results found. Try again with different words?
Search must be at least 3 characters.
- How to update plugin manually through FTP
- How to update UABB?
- How to register your license?
- About Beta Versions
- Will I lose all my design work when I download and re-install the plugin?
- Getting Started with the Ultimate Addons for Beaver Builder
- How can I install the Ultimate Addons for Beaver Builder?
- Automatic Beta Updates
- How to check expiration date of license?
- How to enable / disable Beaver Builder's UI?
- UABB Global Settings
- How to White Label UABB?
- How to enable / disable Live Preview feature?
- How to Hide Templates from your Clients?
- How can I use other modules in Modal Popup / Advanced Accordion / Advanced Tab?
- How to enable / disable modules in UABB to reduce server requests?
- Section and Page Templates don’t look the same when I am using them. Why?
- How can I Begin Building a Page using UABB?
- Troubleshooting Tips for Ultimate Addon’s Font Icons
- White Screen / Blank Screen / 500 Error After Installation
- Fatal error: Call to undefined function array_replace_recursive()
- How to Increase the Memory Limit of your site?
- Fatal error: Class 'FLBuilderAdminSettings' not found
- Failed to download template from Template Cloud
- Haven't received update notification yet?
- cURL error 51: SSL: No alternative certificate subject name matches target host name
- DIY Troubleshooting
How to filter Query Parameters in Advanced Posts?
Advanced posts are loved by a lot of people due to its flexibility to modify query parameters. But, in some cases, developers need to modify the query parameters which are not specified in options. Let’s say you are displaying events using Advanced posts module and you want to disregard past events. Let’s assume that the event date is specified in meta with key `event_date`. Also we are checking with HTML id `events-list` before modifying the parameters so that this won’t be applied to all blog post modules on the site.
/* Advanced Query Parameters filtering for UABB Posts module */
function your_prefix_uabb_blog_posts_query_args( $args, $settings ) {
// Give an HTML id and check it before modifying arguments so that it will not be applied to all blog post modules on the site.
if ( $settings->id == 'events-list' ) {
$args['orderby'] = '';
$args['meta_key'] = 'event_date';
$args['nopaging'] = true;
$args['posts_per_page'] = '2';
$args['meta_query'] =
array(
'key' => 'event_date',
'compare' => '<', 'value' => date( "Ymd" ),
'type' => 'DATE'
);
}
return $args;
}
add_filter( 'uabb_blog_posts_query_args', 'your_prefix_uabb_blog_posts_query_args', 20, 2 );
We are using `uabb_blog_posts_query_args` filter to accomplish this. You can take a look at all our filter reference.
You need to put the above code snippet in functions.php file of your theme/child theme.
This is just one example. You have lots of possibilities to filter posts with WP Query Parameters.
We don't respond to the article feedback, we use it to improve our support content.