WordPress action hook
wpseo_save_indexable
Fired by 8 WordPress plugins, running on 10M+ sites between them.
“Action: 'wpseo_save_indexable' - Allow developers to perform an action when the indexable is updated.”
How to use wpseo_save_indexable
It's an action: your callback runs at that point and receives 2 arguments. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'wpseo_save_indexable', function( $post_id, $post ) {
// Your code runs here.
}, 10, 2 );Argument names come from iGen SEO's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
8 plugins that fire wpseo_save_indexable
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Yoast SEO10+ million installs
do_action( 'wpseo_save_indexable', $indexable, $indexable_before )src/helpers/indexable-helper.php:314 -
Soro10,000+ installs
do_action( 'wpseo_save_indexable', $post_id, get_post($post_id) )soro-seo.php:1002 -
iGen SEO900+ installs
do_action( 'wpseo_save_indexable', $post_id, get_post( $post_id ) )includes/class-igen-seo-connector.php:3449 -
Edward200+ installs
do_action( 'wpseo_save_indexable', $post_id, get_post($post_id) )includes/YoastIndexable.php:49 -
Refine Rank AIFewer than 10 installs
do_action( 'wpseo_save_indexable', $post_id, $object_type )refine-rank-ai.php:6048 -
SEOvault AI ConnectorFewer than 10 installs
do_action( 'wpseo_save_indexable', $post_id, get_post( $post_id ) )includes/rest-api.php:507 -
RankRepair AIFewer than 10 installs
do_action( 'wpseo_save_indexable', $post_id )includes/class-rankrepair-ai-seo-adapters.php:223 -
SEOvault AIFewer than 10 installs
do_action( 'wpseo_save_indexable', $post_id, get_post( $post_id ) )includes/Api/Router.php:1369
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.