For the complete documentation index, see llms.txt. This page is also available as Markdown.

Layout WordPress hooks

Advanced Views includes a set of WordPress hooks, allowing you to customize the Layouts from your theme (or code snippets). Pay attention that in ordinary cases, customization should be done using the Layout Controller.

This page focuses only on the Layout hooks; check this page to see generic plugin hooks.

1. Layout hooks list

Please make sure you've installed the latest version of the plugin before using these filters.

If you need to customize something, but a filter or hook is unavailable, then contact us, and we will try to add it as soon as possible.

advanced_views/layout/field_data

advanced_views/layout/field_data/type={fieldType}

advanced_views/layout/field_data/name={fieldName}

advanced_views/layout/field_data/layout_id={id}

advanced_views/layout/custom_variables

advanced_views/custom_variables/layout_id={id}

do_shortcode_tag

2. Layout hook descriptions

Field Data

Allows you to amend field data before it's inserted into the template.

  • $field_data (array) Field data

  • $field_meta (Field_Meta_Interface) Information about the field.

  • $view_id (string) Unique ID of the current Layout.

Custom Layout Variables

Allows to add custom variables to the custom markup.

  • $php_variables (array) Current custom variables (Custom Markup Variables field, an associative array of values, where keys are variable names). These variables can be accessed in the custom markup with brackets, like {VARIABLE_NAME}

  • $view_id (string) Unique ID of the current Layout

  • $object_id (int) ID of the current data post

  • $field_values (array) An associative field values array, where keys are field identifiers

Shortcode output

It’s a built-in WordPress hook that allows modifying the output of the whole shortcode. Code example shown below. Read more here.

Last updated