Latest Post Shortcode 14.2.3 has 1 actions and 39 filters, read directly from its source code on Nov 18, 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 Latest Post Shortcode fires an action
add_action( 'lps/before_check_posts', function( $arg1, $is_lps_ajax ) {
// Your code runs here.
}, 10, 2 );
// Change a value Latest Post Shortcode is about to use
add_filter( 'lps/filter_front_end_statuses', function( $allowed_statuses ) {
// Change $allowed_statuses here.
return $allowed_statuses;
}, 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
-
/** * Allow external scripts to output content in the wrapper element, after the * pagination. */ do_action( 'lps/before_check_posts', self::$args, $is_lps_ajax ); -
/** * Allow external scripts to alter the usable statuses. */ apply_filters( 'lps/filter_front_end_statuses', $allowed_statuses ); -
/** * Allow external scripts to alter the usable statuses. */ apply_filters( 'lps/filter_statuses', $statuses ); -
/** * Allow external scripts to alter the usable taxonomies. */ apply_filters( 'lps/filter_taxonomies', $taxonomies ); -
/** * Allow external scripts to alter the usable post types. */ apply_filters( 'lps/filter_types', $types ); -
/** * Allow external scripts to alter the usable taxonomies. */ apply_filters( 'lps/usable_taxonomies', $usable_taxonomies ); -
apply_filters( 'lps/override_card', '', self::$args->card_filter, $postobj, $args, self::$args->card_type ); -
apply_filters( 'lps/override_card_terms', $tags, (int) $ob->ID, 'post_tag', self::$args->shortcode_id ); -
apply_filters( 'the_content', $item->post_content ); -
apply_filters( 'the_excerpt', strip_shortcodes( get_the_excerpt( $item ) ) ); -
apply_filters_deprecated( 'lps_filter_display_posts_list', [ $display_posts_list ], '11.4.0', 'lps/override_card_display' ); -
apply_filters_deprecated( 'lps_filter_exclude_previous_content_ids', [ $lps_current_post_embedded_item_ids ], '12.1.0', 'lps/exclude_ids' ); -
apply_filters_deprecated( 'lps_filter_remove_update_info', [ false ], '11.0.0', 'lps/remove_update_info' ); -
apply_filters_deprecated( 'lps_filter_tile_patterns', [ self::$tile_pattern ], '11.4.0', 'lps/override_card_patterns' ); -
apply_filters_deprecated( 'lps_filter_use_custom_query_arguments', [ $qargs ], '12.1.0', 'lps/query_arguments' ); -
apply_filters_deprecated( 'lps_filter_use_custom_section_markup_end', [ self::$args->card_pattern, self::$args->shortcode_id, self::$args->section_class, $args ], '11.4.0', 'lps/override_section_end' ); -
apply_filters_deprecated( 'lps_filter_use_custom_section_markup_start', [ self::$args->card_pattern, self::$args->shortcode_id, self::$args->section_class, $args ], '11.4.0', 'lps/override_section_start' ); -
apply_filters_deprecated( 'lps_filter_use_custom_shortcode_arguments', [ $args ], '12.1.0', 'lps/shortcode_arguments' ); -
apply_filters_deprecated( 'lps_filter_use_custom_tile_markup', [ self::$args->card_pattern, $postobj, $args ], '11.4.0', 'lps/override_card' ); -
apply_filters( 'lps/card_output_types', [ '' => esc_html__( '-- unspecified --', 'lps' ), 'as-column' => esc_html__( 'vertical card', 'lps' ), 'h-image-info' => esc_html__( 'horizontal card: image + info', 'lps' ), 'h-info-image' => esc_html__( 'horizontal card: info + image', 'lps' ), 'as-overlay' => esc_html__( 'overlay', 'lps' ), ] ); -
apply_filters( 'lps/exclude_ids', $lps_current_post_embedded_item_ids ); -
apply_filters( 'lps/filter_sites_list', [ 'public' => '1' ] ); -
apply_filters( 'lps/load_assets_on_page', $always_load ); -
apply_filters( 'lps/override_card_display', $display_posts_list ); -
apply_filters( 'lps/override_card_patterns', self::$tile_pattern ); -
apply_filters( 'lps/override_pagination_display/first', '‹ ' ); -
apply_filters( 'lps/override_pagination_display/first_icon', '<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" aria-label="' . __( 'First page', 'lps' ) . '"><path fill="currentColor" d="M224 128a8 8 0 0 1-8 8H59.31l58.35 58.34a8 8 0 0 1-11.32 11.32l-72-72a8 8 0 0 1 0-11.32l72-72a8 8 0 0 1 11.32 11.32L59.31 120H216a8 8 0 0 1 8 8"/></svg>' ); -
apply_filters( 'lps/override_pagination_display/last', ' ›' ); -
apply_filters( 'lps/override_pagination_display/last_icon', '<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" aria-label="' . __( 'Last page', 'lps' ) . '"><path fill="currentColor" d="m221.66 133.66l-72 72a8 8 0 0 1-11.32-11.32L196.69 136H40a8 8 0 0 1 0-16h156.69l-58.35-58.34a8 8 0 0 1 11.32-11.32l72 72a8 8 0 0 1 0 11.32"/></svg>' ); -
apply_filters( 'lps/override_pagination_display/next', '»' ); -
apply_filters( 'lps/override_pagination_display/next_icon', '<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" aria-label="' . __( 'Next page', 'lps' ) . '"><path fill="currentColor" d="m181.66 133.66l-80 80a8 8 0 0 1-11.32-11.32L164.69 128L90.34 53.66a8 8 0 0 1 11.32-11.32l80 80a8 8 0 0 1 0 11.32"/></svg>' ); -
apply_filters( 'lps/override_pagination_display/prev', '«' ); -
apply_filters( 'lps/override_pagination_display/prev_icon', '<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" aria-label="' . __( 'Previous page', 'lps' ) . '"><path fill="currentColor" d="M165.66 202.34a8 8 0 0 1-11.32 11.32l-80-80a8 8 0 0 1 0-11.32l80-80a8 8 0 0 1 11.32 11.32L91.31 128Z"/></svg>' ); -
apply_filters( 'lps/override_post_class', $article_class, self::$args->shortcode_id, $args, (int) $postobj->ID ); -
apply_filters( 'lps/override_section_end', '</section>', self::$args->shortcode_id, self::$args->section_class, self::$args->card_filter, $is_lps_ajax_call, $args ); -
apply_filters( 'lps/override_section_start', '<section class="latest-post-selection' . esc_attr( self::$args->section_class ) . '" id="' . esc_attr( self::$args->shortcode_id ) . '" style="' . self::$args->css_vars . '" role="list"' . $data_wrapper . '>', self::$args->shortcode_id, self::$args->section_class, self::$args->card_filter, $is_lps_ajax_call, $args ); -
apply_filters( 'lps/query_arguments', $qargs ); -
apply_filters( 'lps/remove_donate_info', false ); -
apply_filters( 'lps/remove_update_info', false ); -
apply_filters( 'lps/shortcode_arguments', $args );
Generated from Latest Post Shortcode'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: