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

Selection WordPress hooks

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

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

1. Selection 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/post_selection/query_args (Pro)

advanced_views/post_selection/query_args/id={id} (Pro)

advanced_views/post_selection/posts_data (Pro)

advanced_views/post_selection/posts_data/selection_id={id} (Pro)

advanced_views/post_selection/custom_variables

advanced_views/post_selection/custom_variables/selection_id={id}

do_shortcode_tag

2. Selection hook descriptions

Query Args

Allows to customize WP_Query arguments that are used to get posts for a Post Selection.

  • $args (array) Arguments for WP_Query. See all available here.

  • $card_id (string) Unique ID of the current Post Selection

  • $page_number (int) Current page number. By default 1, has another number only within the AJAX pagination.

Posts Data

Allows to apply PHP filtering to the posts found.

Custom Post Selection Variables

Allows to add custom variables to the custom markup.

  • $custom_variables (array) An associative array of values, where keys are variable names. These variables can be accessed in the custom markup with brackets, like {VARIABLE_NAME}

  • $card_id (string) Unique ID of the current Post Selection

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