MM Post Grid 0.1 has 4 actions and 18 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when MM Post Grid fires an action
add_action( 'mmpg_after_card', function( $post, $args ) {
// Your code runs here.
}, 10, 2 );
// Change a value MM Post Grid is about to use
add_filter( 'mmpg_allowed_html', function( $allowed ) {
// Change $allowed here.
return $allowed;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Fires after a card is printed. */ do_action( 'mmpg_after_card', $post, $args ); -
/** * Fires after a grid is printed. */ do_action( 'mmpg_after_grid', $args, $query ); -
/** * Filters the HTML allowed in the grid output. */ apply_filters( 'mmpg_allowed_html', $allowed ); -
/** * Fires before a card is printed. */ do_action( 'mmpg_before_card', $post, $args ); -
/** * Fires before a grid is printed. */ do_action( 'mmpg_before_grid', $args, $query ); -
/** * Filters the CSS classes of a card. */ apply_filters( 'mmpg_card_classes', $classes, $post, $args ); -
/** * Filters the card excerpt. */ apply_filters( 'mmpg_card_excerpt', $excerpt, $post, $args ); -
/** * Filters the markup of a single card. */ apply_filters( 'mmpg_card_html', $html, $post, $args ); -
/** * Filters the media block of a card. */ apply_filters( 'mmpg_card_media', $html, $post, $args ); -
/** * Filters the card meta line. */ apply_filters( 'mmpg_card_meta', $html, $post, $args ); -
/** * Filters the taxonomy shown on a card. */ apply_filters( 'mmpg_card_taxonomy', $taxonomy, $post, $args ); -
/** * Filters how many terms a card shows. */ apply_filters( 'mmpg_card_terms_limit', 1, $post, $args ); -
/** * Filters the card title. */ apply_filters( 'mmpg_card_title', $title, $post, $args ); -
/** * Filters the message shown when a grid has no posts. */ apply_filters( 'mmpg_empty_message', __( 'No posts found.', 'mm-post-grid' ), $args ); -
/** * Filters the wrapper classes. */ apply_filters( 'mmpg_grid_classes', $classes, $args ); -
/** * Filters the complete grid markup. */ apply_filters( 'mmpg_grid_html', $html, $args, $query ); -
/** * Filters the inline custom properties printed after the stylesheet. */ apply_filters( 'mmpg_inline_css', $css, $settings ); -
/** * Filters the query arguments before the grid is queried. */ apply_filters( 'mmpg_query_args', $query_args, $args, $page ); -
/** * Filters the read more label. */ apply_filters( 'mmpg_read_more_text', (string) $args['read_more_text'], $post, $args ); -
/** * Filters the setting schema. */ apply_filters( 'mmpg_settings_schema', $schema ); -
/** * Filters the shortcode attribute defaults. */ apply_filters( 'mmpg_shortcode_defaults', $defaults ); -
/** * Filters the styling templates. */ apply_filters( 'mmpg_templates', $templates );
Generated from MM Post Grid's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: