Skip to content

grouped meta accessor

Polmonite edited this page Sep 21, 2019 · 1 revision

GroupedMetaAccessor

The grouped_meta accessor retrieve a group of meta with the same prefix.

Syntax:

@grouped_meta:{meta_prefix},{auto_detect_single},{default}

  • {meta_prefix}: prefix of the wanted post metas;
  • {auto_detect_single}: post metas are retrieved by default as arrays; if this option is set to true, it will guess if a meta is single or multiple (defaults to false);
  • {default}: default value, if no post metas are found.

It is useful when multiple metas are logically linked. This is quite common especially to custom fields created by plugins, which often prefix them with the plugin name.

Examples:

Other

Extend Malini

  • Create your own Accessor
  • Create your own Decorator
  • Available Extensions
    • Malini\Aeria
    • Malini\YOAST
    • Malini\ACF
Clone this wiki locally