Related Posts Thumbnails 6.0.0 has 4 actions and 41 filters, read directly from its source code on Nov 17, 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 Related Posts Thumbnails fires an action
add_action( 'wp_wpb_sdk_after_uninstall', function( $slug ) {
// Your code runs here.
}, 10, 1 );
// Change a value Related Posts Thumbnails is about to use
add_filter( 'relpoststh_show_all_categories', function( $category_list, $id, $taxonomy, $post_type ) {
// Change $category_list here.
return $category_list;
}, 10, 4 );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
-
/** * Modifiy the category listings. */ apply_filters( 'relpoststh_show_all_categories', $category_list, $id, $taxonomy, $post_type ); -
/** * Filter whether RPT frontend assets should load on this request. */ apply_filters( 'rpt_should_load_frontend_assets', $should_load ); -
rpt_thumbnailsizes
filter/** * Filter thumbnail size options shown in the settings UI. */ apply_filters( 'rpt_thumbnailsizes', $thumbnail_sizes ); -
/** * Filter allowed SDK opt-out setting keys for AJAX toggles. */ apply_filters( 'wpb_sdk_allowed_opt_out_settings', $allowed, $this->slug ); -
/** * Filter allowed page slugs for post-opt-in redirect. */ apply_filters( 'wpb_sdk_allowed_redirect_page_slugs', $allowed, $slug, $module ); -
wpb_sdk_api_endpoint
filter/** * Filter telemetry API base URL for a product. */ apply_filters( 'wpb_sdk_api_endpoint', $endpoint, $slug ); -
wpb_sdk_custom_optin_slugs
filter/** * Filter products that use a custom opt-in form instead of * wpb-sdk-optin-form.php. */ apply_filters( 'wpb_sdk_custom_optin_slugs', $custom, $slug ); -
/** * Filter slugs that manage their own Opt In/Out plugin row links (not the * SDK). */ apply_filters( 'wpb_sdk_legacy_opt_action_link_slugs', $legacy, $slug ); -
wpb_sdk_optin_template_vars
filter/** * Filter template variables passed to opt-in view. */ apply_filters( 'wpb_sdk_optin_template_vars', $optin_vars, $slug, $module ); -
wpb_sdk_plugin_action_links
filter/** * Append product-specific plugin row links (Settings, etc.) after SDK * opt-in/out. */ apply_filters( 'wpb_sdk_plugin_action_links', $links, $this->slug, $this->module ); -
/** * Filter whether visiting the opt-in page should redirect away. */ apply_filters( 'wpb_sdk_should_redirect_from_optin_page', 'yes' === $decision, $slug, $decision ); -
wp_wpb_sdk_after_uninstall
actiondo_action( 'wp_wpb_sdk_after_uninstall', $slug ); -
wpb_sdk_optin_redirect_url
filterapply_filters( 'wpb_sdk_optin_redirect_url', $url, $slug, $optin, $redirect_override ); -
rpth_amp
filterapply_filters( 'rpth_amp', true ); -
wpb_sdk_bootstrap_module
actiondo_action( 'wpb_sdk_bootstrap_module', $slug ); -
relpost_anchor_attr
filterapply_filters( 'relpost_anchor_attr', $post_id, $rpt_anchor_attrs ); -
relpoststh_title_tag
filterapply_filters( 'relpoststh_title_tag', (string) rpt_settings()->rpt_get( 'general.title_tag', 'h2' ) ); -
rpt_content_align
filterapply_filters( 'rpt_content_align', '' ); -
rpt_content_prioirty
filterapply_filters( 'rpt_content_prioirty', 10 ); -
rpt_custom_relationship
filterapply_filters( 'rpt_custom_relationship', array( get_post_type( $post_id ) ) ); -
rpt_exclude_post
filterapply_filters( 'rpt_exclude_post', '' ); -
rpt_prevent_img_size_check
filterapply_filters( 'rpt_prevent_img_size_check', false ); -
rpt_prevent_on_edit
filterapply_filters( 'rpt_prevent_on_edit', array('divi' => false,) ); -
rpt_remove_empty_cfield
filterapply_filters( 'rpt_remove_empty_cfield', false ); -
rpt_top_text
filterapply_filters( 'rpt_top_text', rpt_settings_format_top_text_html( $top_text, $title_tag ) ); -
rpt_use_background_thumbnail
filterapply_filters( 'rpt_use_background_thumbnail', false ); -
rpt_wpb92640233_loaded
actiondo_action( 'rpt_wpb92640233_loaded' ); -
rpt-single-background
filterapply_filters( 'rpt-single-background', 'data-bg="' . esc_url( $url ) . '" style="background: transparent no-repeat scroll 0% 0%; width: ' . esc_attr( $display_sizes['width'] ) . 'px; height: ' . esc_attr( $display_sizes['height'] ) . 'px; aspect-ratio: ' . esc_attr( $context['image_size'] ) . ';"' ); -
rpth_after_content
filterapply_filters( 'rpth_after_content', '', $post ); -
widget_title
filterapply_filters( 'widget_title', $instance['title'] ?? '' ); -
apply_filters( "wpb_sdk_{$slug}_optin_view_path", $path, $module ); -
wpb_sdk_module_config
filterapply_filters( 'wpb_sdk_module_config', $module ); -
wpb_sdk_optin_admin_user_id
filterapply_filters( 'wpb_sdk_optin_admin_user_id', $admin_id, $slug ); -
apply_filters( "wpb_sdk_optin_logo_url_{$slug}", $logo_url, $module ); -
wpb_sdk_optin_verified
actiondo_action( 'wpb_sdk_optin_verified', $current_user, $module ); -
wpb_sdk_optin_view_path
filterapply_filters( 'wpb_sdk_optin_view_path', $path, $slug, $module ); -
wpb_sdk_plugin_main_file
filterapply_filters( 'wpb_sdk_plugin_main_file', '', $slug ); -
apply_filters( 'wpb_sdk_should_cleanup_on_uninstall', true, $slug ); -
apply_filters( 'wpb_sdk_site_used_centralized_sdk_32', false, $slug, $module ); -
apply_filters( 'wpb_sdk_uninstall_option_names', $options, $slug ); -
apply_filters( 'wpb_sdk_uninstall_user_meta_keys', array_values( array_unique( array_filter( $user_meta ) ) ), $slug );
Generated from Related Posts Thumbnails's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: