WP Query Block Extension – Metadata Filter
We understand that sometimes, you want fine-tuned control over what appears in your Query Loop block. That’s why we’re excited to unveil our latest innovation: the Metadata Filter block extension.
Thanks to this potent enhancement in your WordPress toolkit, you can now easily filter the results of the Query Loop block according to the conditions you’ve defined within Inner Queries. The relationship between each Inner Query is set to AND.
Table of Contents
Settings
The settings can be located within the Metadata Filter panel. Activate the filtering by toggling on the Enable Metadata Filter option.
Fields within each Inner Queries:
- Meta Key: The custom field key that you would like the query to be associated with.
- Meta Value: Specify the custom field value against which you’d like to perform the comparison.
- Compare: Define how you want to compare the value of a custom field with a given value in your query. Options are ‘Equal’, ‘Not Equal’, ‘Greater than’, etc.
- Meta Type: Specify the data type to which you would like to convert the custom field’s value before performing the comparison.
Code
The Block Extension is Open Source.
How to use the extension on UBC CMS?
Navigate to your site’s Dashboard on UBC CMS and go to Plugins. Search for WP Query Block Extension – Metadata Filter and activate the plugin. The functionalities are automatically added to every single Query Loop block on your site.