For developers who need to customize the levels output beyond the block settings, the Advanced Levels Page Add On offers several action and filter hooks. Use them to add content around each level, add columns to the Table layout, and change the comparison rows or allowed HTML.

Actions

pmproal_before_template_load

Fires before the selected layout is displayed, in every layout. It runs inside the wrapping div.pmpro element, after any message (such as the admin-only skipped levels notice). Use this to add content above the levels.

do_action( 'pmproal_before_template_load' );

Parameters

None.

pmproal_before_level

Fires at the start of each level, before the level name. Runs in the Div, 2 Columns, 3 Columns, and 4 Columns layouts, and in the stacked cards the Compare Table layout shows on small screens.

do_action( 'pmproal_before_level', int $level_id, string $layout );

Parameters

  • $level_id: int; The ID of the level being displayed.
  • $layout: string; The layout value from the block or shortcode, such as div, 3col, or compare_table.

pmproal_after_level

Fires at the end of each level, after the price, button, and expiration. Runs in the same layouts as pmproal_before_level.

do_action( 'pmproal_after_level', int $level_id, string $layout );

Parameters

  • $level_id: int; The ID of the level being displayed.
  • $layout: string; The layout value from the block or shortcode.

pmproal_extra_cols_before_header

Fires in the header row of the Table layout, before the Level column. Output a <th> element to add a column header. Pair it with pmproal_extra_cols_before_body to fill the column for each level.

do_action( 'pmproal_extra_cols_before_header' );

Parameters

None.

pmproal_extra_cols_after_header

Fires in the header row of the Table layout, after the button column. Output a <th> element to add a column header. Pair it with pmproal_extra_cols_after_body.

do_action( 'pmproal_extra_cols_after_header' );

Parameters

None.

pmproal_extra_cols_before_body

Fires in each level row of the Table layout, before the level name cell. Output a <td> element to fill the column you added with pmproal_extra_cols_before_header.

do_action( 'pmproal_extra_cols_before_body', int $level_id, string|null $template );

Parameters

  • $level_id: int; The ID of the level in this row.
  • $template: string|null; The value of the legacy template shortcode attribute. This is null unless the shortcode sets it.

pmproal_extra_cols_after_body

Fires in each level row of the Table layout, after the button cell. Output a <td> element to fill the column you added with pmproal_extra_cols_after_header.

do_action( 'pmproal_extra_cols_after_body', int $level_id, string|null $template );

Parameters

  • $level_id: int; The ID of the level in this row.
  • $template: string|null; The value of the legacy template shortcode attribute. This is null unless the shortcode sets it.

Filters

pmpro_advanced_levels_compare_items

Filters the values in a single comparison row of the Compare Table layout. Runs once per row in the full table and again for the stacked cards on small screens. Use this to change a label or value based on the current user or other conditions.

apply_filters( 'pmpro_advanced_levels_compare_items', array $compareitem_values );

Parameters

  • $compareitem_values: array; The row split on commas. Index 0 is the row label, and each following index is the value for the next level in display order.

pmproal_allowed_html

Filters the HTML tags and attributes allowed in level names, prices, expiration text, and comparison rows. Add tags to this array to keep them in the output.

apply_filters( 'pmproal_allowed_html', array $allowed_html );

Parameters

  • $allowed_html: array; Allowed tags and their attributes, in the format used by wp_kses(). By default, allows a (with class, href, target, and title), p, b, em, br, strike, and strong.

pmpro_levels_array

A Paid Memberships Pro core filter that the Add On also applies to the levels it is about to display. Use this to remove or reorder levels. If you already use this filter to change the default Membership Levels page, it also affects every Advanced Levels Page block and shortcode on your site.

apply_filters( 'pmpro_levels_array', array $pmpro_levels_filtered );

Parameters

  • $pmpro_levels_filtered: array; The level objects to display, after applying the Levels setting and removing levels with new signups disabled.

Last updated on November 9, 2026


Was this article helpful?
YesNo