Dynamic Injection

The value field in the Meta Filter supports dynamic injection. This means you don’t need to use only static values, but have the option to also define page id/field and datetime aliases. These aliases will be replaced dynamically with the current value depending on the page and/or current date and time respectively.

Get current post ID

Note: $post$ will be replaced with the current post id.

Example usage: find all posts where post_object/relationship field contains the current page in the list.

Compare current post with field value

To compare with a field value, you can use $post$.field-name, where 'field-name' should be replaced with the name of your target field. In this way, the plugin will automatically get and use a value of the field from the current page in the query.

Example usage: find all posts where a 'select' field has the same option chosen, as the option chosen on the current page.

Compare date to current date and time

To compare the value in an ACF Date or an ACF Date/Time field to the current date and time.

Note: $now$ will be replaced with the current date and time the page is viewed. You can also add or remove periods. For example, you can use '$now$ + 1 day' or '$now$ - 1 week'. The following period keys are supported: minute, hour, day, week and month.

Example usage: find all posts where 'date' field value is "Bigger than" current date and time. So as to show only upcoming events in the posts grid or list.

Extended support for Post_object and Relationship fields

Advanced Views Framework: Pro Edition supports Post_object and Relationship field types in the Meta filters.

Step by step guide

See the step by step guide on how to display Employee CPT items on a Company CPT post.

Last updated