Support Log in

32. Hook Reference

Developer Guide
Prefer video? Watch the Rank Forge tutorials 9 short guides covering every feature Watch

The main WordPress hooks that Rank Forge registers for the page head, post saves and redirects, plus a few others. It is not a complete list: Rank Forge registers more, for example AJAX handlers, the term edit fields and the sitemap rewrite rules on init. The hooks of the Pro add-on classes RANKFORGE_AB_Testing and RANKFORGE_Auto_Links are registered only when the license allows ab_testing and auto_links.

Actions (wp_head)

PriorityClassMethodOutput
0RANKFORGE_AB_Testingmaybe_swap_metaTitle/description override for variant B
1RANKFORGE_Meta_Generatoroutput_meta_tagsMeta tags: title, description, OG, Twitter
5RANKFORGE_Schemaoutput_schemaPrimary JSON-LD schema
6RANKFORGE_Local_Seooutput_local_schemaLocalBusiness JSON-LD
6RANKFORGE_Video_Seooutput_video_schemaVideoObject JSON-LD

Actions (save_post)

PriorityClassMethodDescription
10RANKFORGE_Schemainvalidate_ai_schema_cacheClears AI schema cache
18RANKFORGE_Video_Seoauto_detect_videosScans for video embeds
20RANKFORGE_Analyzerauto_analyzeSaves meta + runs analysis
20RANKFORGE_AB_Testingsave_meta_boxSaves A/B test fields
99RANKFORGE_Sitemapinvalidate_cacheClears sitemap cache

Actions (template_redirect)

PriorityClassMethodDescription
1RANKFORGE_Redirectshandle_redirectExecutes matching redirects
99RANKFORGE_Redirectstrack_404Logs 404 URLs

Other Hooks

HookClassDescription
transition_post_statusRANKFORGE_Auto_LinksAuto-link when a post or page moves to publish from another status
post_updatedRANKFORGE_RedirectsCreates a 301 redirect when a published post’s slug changes
wp_robots (filter)RANKFORGE_Robots_Metafilter_wp_robots adds the robots directives to the single robots tag that WordPress prints; Rank Forge does not print a robots tag of its own
add_attachmentRANKFORGE_Image_SeoAuto alt text on upload
wp_dashboard_setupRANKFORGE_DashboardSEO Overview widget
rest_api_initRANKFORGE_Rest_ApiRegister REST routes
competitor frontend hooksRANKFORGE_Competitor_CoexistenceSuppresses common duplicate frontend metadata from Yoast description, robots, Open Graph, and Twitter presenters, plus the output of All in One SEO and SEOPress, and the Rank Math canonical tag when the post has a custom canonical set in Rank Forge, while Rank Forge is active; Yoast title output stays available so themes that rely on it still get a <title> tag using Rank Forge’s resolved title

—

Forge AI Assistant Online

Hi! I'm the Rank Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs