Post Grid Blocks & Templates for News, Magazine, & Blog Sites 5.1.8 has 10 actions and 135 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 Post Grid Blocks & Templates for News, Magazine, & Blog Sites fires an action
add_action( 'ultp_block_loop_post', function( $post_id, $attr ) {
// Your code runs here.
}, 10, 2 );
// Change a value Post Grid Blocks & Templates for News, Magazine, & Blog Sites is about to use
add_filter( 'ultp_query_stage', function( $query_args, $arg2, $attr ) {
// Change $query_args here.
return $query_args;
}, 10, 3 );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
-
/** * A step of the query PostX Pro adds to. `$stage` is `author` (authors left * out), `exclude_terms` (terms left out), `unique` (posts already shown by a * block of the same group) or `archive_unique` (the same, for archive * templates). */ apply_filters( 'ultp_query_stage', $query_args, 'author', $attr ); -
/** * Filter `ultp_ajax_source_post_types`: post types that are not publicly * viewable but whose published posts are rendered into public pages, such as a * theme builder's layout type. Visitors may page and filter PostX blocks * stored in them. */ apply_filters( 'ultp_ajax_source_post_types', array( 'ultp_builder', 'ultp_templates', 'wp_template', 'wp_template_part', 'wp_block' ) ); -
/** * Inline (button) options for a select filter type PostX does not render * itself. */ apply_filters( 'ultp_advanced_filter_button_options', null, $type, $data_ids, $post_types, $option ); -
/** * Post types the filter applies to. The filter can resolve a source of its * own. */ apply_filters( 'ultp_advanced_filter_post_types', $post_types, $attr ); -
/** * Front-end markup for the Advanced Filter search block. */ apply_filters( 'ultp_advanced_filter_search_content', '', (array) $attr ); -
/** * Dropdown options for a select filter type PostX does not render itself. */ apply_filters( 'ultp_advanced_filter_select_options', false, $type, $post_types, $filtered_specific, $mode ); -
/** * At-rules with a block that PostX CSS may hold, without the `@` or a vendor * prefix. */ apply_filters( 'ultp_css_at_rules', array( 'media', 'supports', 'container', 'layer', 'keyframes', 'font-face', 'page', 'property', 'scope', 'starting-style', 'counter-style', 'font-feature-values', 'font-palette-values' ) ); -
/** * Hosts an @import in PostX CSS may load a stylesheet from, over https. */ apply_filters( 'ultp_css_import_hosts', array( 'fonts.googleapis.com' ) ); -
/** * Hosts a url() in PostX CSS may point to, such as 'example.com'. Empty, the * default, allows any host whose URL has a protocol WordPress allows, subject * to Google Fonts consent. Relative URLs and data: images and fonts are always * allowed. */ apply_filters( 'ultp_css_url_hosts', array() ); -
/** * Post types the post picker searches. */ apply_filters( 'ultp_post_search_post_types', $post_type, $request_type, $condition_type ); -
/** * Resolves a term of a taxonomy PostX does not know (the "Multiple Taxonomy" * choice, added by PostX Pro). Return null to leave the term as it is, an * empty array to skip it, or `array( 'taxonomy' => ..., 'term' => ... )`. */ apply_filters( 'ultp_query_filter_term', $resolved, $val, $attr ); -
/** * The post type (or a JSON list of post types) a block queries. A callback may * answer for a source of its own. */ apply_filters( 'ultp_query_post_type', $post_type, $attr ); -
/** * Specific posts ("Specific Posts" and "Custom Selections" sources), added by * PostX Pro. Return the finished query arguments to use them as they are, or * null to carry on. */ apply_filters( 'ultp_query_specific_posts', null, $query_args, $attr ); -
/** * Applies a Quick Query to the query arguments. PostX Pro provides the Quick * Query choices and answers this. */ apply_filters( 'ultp_quick_query_args', $args, $prams ); -
/** * Register schemas for extension-owned writable settings, without adding paid * definitions in Free. */ apply_filters( 'ultp_rest_settings_schema', $properties ); -
/** * Answers the rows of the term picker of an exclude-terms condition. */ apply_filters( 'ultp_taxvalue_exclude_rows', array( array( 'value' => '', 'title' => '- Select -', ), ), array( 'condition' => $condition_type, 'post_types' => $multiple_post_type, 'term' => $term_type, ) ); -
/** * Answers the list of post types whose taxonomies the picker offers. */ apply_filters( 'ultp_taxvalue_post_types', null, $get_multiple_post_type, array( 'condition' => $condition_type, 'term' => $term_type, ) ); -
/** * Answers the rows of the term picker. */ apply_filters( 'ultp_taxvalue_rows', $data, array( 'condition' => $condition_type, 'post_types' => $multiple_post_type, 'term' => $term_type, ) ); -
/** * Answers the taxonomies whose terms the term picker lists for a * single-taxonomy condition. */ apply_filters( 'ultp_taxvalue_taxonomies', array( $split[1] ), array( 'condition' => $condition_type, 'post_types' => $multiple_post_type, 'term' => $term_type, ) ); -
do_action( 'ultp_block_loop_post', $post_id, $attr ); -
do_action( 'ultp_block_after_query', $attr ); -
do_action( 'ultp_block_before_query', $attr ); -
apply_filters( 'ultp_block_loop_end', '', $attr ); -
do_action( 'ultp_enqueue_postx_block_css', array( 'post_id' => $post_id, 'css' => '', ) ); -
apply_filters( 'ultp_post_block_flip', false, $attr, array( 'block' => $block_name ) ); -
apply_filters( 'the_content', $post_content ); -
apply_filters( "ultp_default_option_{$option}", $default_value, $option ); -
apply_filters( 'ultp_affiliate_id', false ); -
do_action( 'ultp_after_content' ); -
do_action( 'ultp_before_content' ); -
do_action( 'ultp_common_assets_enqueued' ); -
apply_filters( 'ultp_dark_light_inner_text', '', 'light', $layout, $lightText ); -
apply_filters( "ultp_option_{$option}", maybe_unserialize( $value ), $option ); -
apply_filters( 'ultp_post_category_taxonomy', 'category', $attr ); -
apply_filters( 'ultp_post_grid_2_video_popup_attr', '', $attr ); -
apply_filters( "ultp_transient_{$transient}", $value, $transient ); -
apply_filters( 'comment_form_default_fields', array( 'author' => '<div class="ultp-field-control ultp-comment-name">' . wp_kses_post( $auth_label ) . '<input id="author" placeholder="Your name" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></div>', 'email' => '<div class="ultp-field-control ultp-comment-email">' . wp_kses_post( $email_label ) . '<input id="email" placeholder... ); -
apply_filters( 'postx_common_script', false ); -
apply_filters( 'postx_loop_author_by', $authorBy, $user_id, $post_id, isset( $attr['className'] ) ? $attr['className'] : '' ); -
apply_filters( 'postx_loop_author_icon', $authorIcon, $user_id, $post_id, isset( $attr['className'] ) ? $attr['className'] : '' ); -
apply_filters( 'postx_loop_author_image', $authorImg, $user_id, $post_id, isset( $attr['className'] ) ? $attr['className'] : '' ); -
apply_filters( 'postx_loop_author_image_only', $authorImgOnly, $user_id, $post_id, isset( $attr['className'] ) ? $attr['className'] : '' ); -
apply_filters( 'the_excerpt', wp_trim_words( $content, $limit ) ); -
do_action( 'ultimate_post_after_setting_save' ); -
apply_filters( 'ultp_advance_post_meta_icon', $icon, $attr, array( 'item' => $item ) ); -
apply_filters( 'ultp_advanced_filter_default_tax_query', null, $term, $attr ); -
apply_filters( 'ultp_advanced_search_data', '', $attr ); -
apply_filters( 'ultp_ajax_block_attrs', $attrs, array( 'request' => $request, 'block_name' => $block_name, ) ); -
apply_filters( 'ultp_archive_query', $archive_query ); -
apply_filters( 'ultp_archive_title_name_style', '', $attr, $data ); -
apply_filters( 'ultp_archive_title_overlay_style', '', $attr, $data ); -
apply_filters( 'ultp_author_box_image_html', $author_image, $attr, $image_ctx ); -
apply_filters( 'ultp_author_box_image_last_html', '', $attr, $image_ctx ); -
apply_filters( 'ultp_author_box_layout_class', 'layout1', $attr ); -
apply_filters( 'ultp_block_style_schema', $schema ); -
apply_filters( 'ultp_block_style_wrap_media', array(), array( 'breakpoints' => array( 'xl' => $this->breakpoint( 'breakpointSm', 992 ), 'tablet' => $this->breakpoint( 'breakpointSm', 991 ), 'mobile' => $this->breakpoint( 'breakpointXs', 767 ), ), ) ); -
apply_filters( 'ultp_dark_light_layout', 'layout1', $attr ); -
apply_filters( 'ultp_dark_light_side_text', $enableText, $layout ); -
apply_filters( 'ultp_dc_custom_field_sources', array(), $context ); -
apply_filters( 'ultp_dc_custom_metas', $all_custom_metas, $context, $sources ); -
apply_filters( 'ultp_dc_field_value', null, $meta_key, $post_id ); -
apply_filters( 'ultp_dc_is_field_key', false, $key ); -
apply_filters( 'ultp_frontend_query', $query_args ); -
apply_filters( 'ultp_infinite_scroll', $default, $attr, array( 'paged' => $paged, 'pages' => $pages, 'block_name' => $block_name, 'curr_post_id' => $curr_post_id, ) ); -
apply_filters( 'ultp_news_ticker_animation_options', array( 'animation' => $attr['tickerAnimation'], 'speed' => $attr['tickerSpeed'], 'title_style' => '', ), $attr ); -
apply_filters( 'ultp_news_ticker_item_style', $item_style_default, $attr, $speed ); -
apply_filters( 'ultp_news_ticker_time_badge_date', $dateData, $attr['timeBadgeDateFormat'], $post_id, $attr ); -
apply_filters( 'ultp_news_ticker_time_badge_html', $badge_default, $attr, $post_id ); -
apply_filters( 'ultp_news_ticker_type', in_array( $attr['tickerType'], array( 'vertical', 'horizontal' ), true ) ? $attr['tickerType'] : 'vertical', $attr ); -
apply_filters( 'ultp_news_ticker_wrapper_class', '', $attr ); -
apply_filters( 'ultp_next_previous_html', null, $attr, $ctx ); -
apply_filters( 'ultp_post_block_meta_and_category_option', $value, $key, $saved, array( 'block_name' => $block_name ) ); -
apply_filters( 'ultp_post_category_class', '', $attr ); -
apply_filters( 'ultp_post_category_term', array( 'class' => '', 'attr' => '', ), $attr, $val ); -
apply_filters( 'ultp_post_comments_layout_class', 'layout1', $attr ); -
apply_filters( 'ultp_post_excerpt', null, $post_id, array( 'seo_meta' => $show_seo_meta, 'full_excerpt' => $show_full_excerpt, 'excerpt_limit' => $excerpt_limit, ) ); -
apply_filters( 'ultp_post_grid_1_attributes', $defaults ); -
apply_filters( 'ultp_post_grid_1_image_html', $image_block, $attr, array( 'post_id' => $post_id, 'post_thumb_id' => $post_thumb_id, 'post_video' => $post_video, 'title' => $title, 'titlelink' => $titlelink, 'idx' => $idx, ) ); -
apply_filters( 'ultp_post_grid_1_image_size', $attr['imgCrop'], $attr, $idx ); -
apply_filters( 'ultp_post_grid_1_row_classes', $row_default, $attr ); -
apply_filters( 'ultp_post_grid_1_video_inline_html', $inline_default, $attr, array( 'post_id' => $post_id, 'post_video' => $post_video ) ); -
apply_filters( 'ultp_post_grid_1_video_popup_html', $popup_default, $attr, $post_video, $post_id ); -
apply_filters( 'ultp_post_grid_3_layout_class', 'ultp-layout1', $attr ); -
apply_filters( 'ultp_post_grid_4_layout_class', 'ultp-layout1', $attr ); -
apply_filters( 'ultp_post_grid_5_item_is_lead', $idx == 0, $idx, $attr ); -
apply_filters( 'ultp_post_grid_5_layout_class', 'ultp-layout1', $attr ); -
apply_filters( 'ultp_post_grid_6_layout_class', 'ultp-layout1', $attr ); -
apply_filters( 'ultp_post_grid_7_item_is_lead', $idx == 0, $idx, $attr ); -
apply_filters( 'ultp_post_grid_7_layout_class', 'ultp-layout1', $attr ); -
apply_filters( 'ultp_post_image_media_after', '', $attr, array( 'is_video' => $isvideo ) ); -
apply_filters( 'ultp_post_image_media_class', '', $attr, array( 'is_video' => $isvideo ) ); -
apply_filters( 'ultp_post_list_1_excerpt_options', array( 'limit' => $attr['excerptLimit'], 'full' => $attr['showFullExcerpt'] ), $attr, $index ); -
apply_filters( 'ultp_post_list_1_image_html', $image_block, $attr, $image_ctx ); -
apply_filters( 'ultp_post_list_1_image_size', $attr['imgCrop'], $attr, $idx ); -
apply_filters( 'ultp_post_list_1_layout_class', 'ultp-post-list1-layout1', $attr ); -
apply_filters( 'ultp_post_list_1_style_class', 'ultp-pl1a-style1', $attr ); -
apply_filters( 'ultp_post_list_1_top_image_html', '', $attr, $image_ctx ); -
apply_filters( 'ultp_post_list_1_video_inline_html', $inline_default, $attr, array( 'post_id' => $post_id, 'post_video' => $post_video, 'idx' => $idx ) ); -
apply_filters( 'ultp_post_list_2_excerpt_options', array( 'limit' => $idx == 0 ? $attr['excerptLimitLg'] : $attr['excerptLimit'] ), $attr, $idx ); -
apply_filters( 'ultp_post_list_2_layout_class', 'ultp-layout1', $attr ); -
apply_filters( 'ultp_post_list_2_small_image_html', $small_default, $attr, $small_ctx ); -
apply_filters( 'ultp_post_list_2_video_popup_html', $popup_default, $attr, array( 'idx' => $idx, 'post_video' => $post_video, 'title' => $title, 'titlelink' => $titlelink ) ); -
apply_filters( 'ultp_post_list_3_layout_class', 'ultp-layout1', $attr ); -
apply_filters( 'ultp_post_list_3_video_inline_html', $inline_default, $attr, array( 'post_id' => $post_id, 'post_video' => $post_video ) ); -
apply_filters( 'ultp_post_list_4_layout_class', 'ultp-layout1', $attr ); -
apply_filters( 'ultp_post_list_4_small_image_html', $small_default, $attr, $small_ctx ); -
apply_filters( 'ultp_post_list_4_video_popup_html', $popup_default, $attr, array( 'idx' => $idx, 'post_video' => $post_video, 'title' => $title, 'titlelink' => $titlelink ) ); -
apply_filters( 'ultp_post_module_1_attributes', $defaults ); -
apply_filters( 'ultp_post_module_1_layout_class', 'ultp-layout1', $attr ); -
apply_filters( 'ultp_post_module_1_small_image_html', '', $attr, $small_ctx ); -
apply_filters( 'ultp_post_module_1_video_popup_html', $popup_default, $attr, array( 'idx' => $idx, 'post_video' => $post_video, 'title' => $title, 'titlelink' => $titlelink ) ); -
apply_filters( 'ultp_post_module_2_attributes', $defaults ); -
apply_filters( 'ultp_post_module_2_layout_class', 'ultp-layout1', $attr ); -
apply_filters( 'ultp_post_module_2_small_image_html', '', $attr, $small_ctx ); -
apply_filters( 'ultp_post_module_2_video_popup_html', $popup_default, $attr, array( 'idx' => $idx, 'post_video' => $post_video, 'title' => $title, 'titlelink' => $titlelink ) ); -
apply_filters( 'ultp_post_slider_2_items_data', array(), $attr, $layout ); -
apply_filters( 'ultp_post_slider_2_layout_class', 'slide1', $attr ); -
apply_filters( 'ultp_public_post_type', true ); -
apply_filters( 'ultp_search_result_query_args', $query_args, $post ); -
apply_filters( 'ultp_settings', array() ); -
do_action( 'ultp_settings_updated', $key, $val ); -
apply_filters( 'ultp_show_upsell', true ); -
do_action( 'ultp_starter_term_imported', $new_term['term_id'], $taxonomy, $term_data ); -
apply_filters( 'ultp_taxonomy_count_style', '', $attr, $value ); -
apply_filters( 'ultp_taxonomy_item_html', '', $attr, $value, array( 'name' => $name, 'count' => $count, 'excerpt' => $excerpt, ) ); -
apply_filters( 'ultp_taxonomy_layout', '1', $attr ); -
apply_filters( 'ultp_taxonomy_name_style', '', $attr, $value ); -
apply_filters( 'ultp_template_request_body', $body, $context ); -
apply_filters( 'ultp_term_color', '', $term ); -
apply_filters( 'ultp_term_image_id', 0, $term ); -
apply_filters( 'ultp_title_hover_class', '', $attr, $block_name ?? '' ); -
apply_filters( 'ultp_video_icon_html', $icon_default, $attr, array( 'titlelink' => $titlelink ) ); -
apply_filters( 'ultp_video_popup_enabled', false, $attr ); -
apply_filters( 'ultp_video_popup_html', '', $attr, array( 'video' => $post_video, 'title' => $title, 'link' => $titlelink, ) ); -
apply_filters( 'ultp_view_cookies', true ); -
apply_filters( 'ultp_word_read_min', 1200 ); -
apply_filters( 'ultp_youtube_gallery_data', $data_attributes, $attr ); -
apply_filters( 'ultp_youtube_gallery_layout', 'inline', $attr ); -
apply_filters( 'ultp_youtube_gallery_load_more_html', $load_more_default, $attr ); -
apply_filters( 'ultp_youtube_gallery_play_icon', $default_icon, $attr ); -
apply_filters( 'wpml_object_id', $id, 'ultp_templates', true ); -
apply_filters( 'xpo_active_notice_lists', array() );
Generated from Post Grid Blocks & Templates for News, Magazine, & Blog Sites'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: