Support Log in

37. Disabling Specific Features

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

Rank Forge is designed to work alongside other plugins. Each snippet below disables a single feature.

Disabling Meta Output

php
add_action( 'init', function () {
    if ( class_exists( 'RANKFORGE_Meta_Generator' ) ) {
        remove_action( 'wp_head', [ RANKFORGE_Meta_Generator::instance(), 'output_meta_tags' ], 1 );
    }
}, 20 );

Disabling Schema Output

php
add_action( 'init', function () {
    if ( class_exists( 'RANKFORGE_Schema' ) ) {
        remove_action( 'wp_head', [ RANKFORGE_Schema::instance(), 'output_schema' ], 5 );
    }
}, 20 );

Disabling Robots Meta

php
add_action( 'init', function () {
    if ( class_exists( 'RANKFORGE_Robots_Meta' ) ) {
        remove_action( 'wp_head', [ RANKFORGE_Robots_Meta::instance(), 'output_robots_meta' ], 2 );
    }
}, 20 );

Disabling Auto-Analysis on Save

php
add_action( 'init', function () {
    if ( class_exists( 'RANKFORGE_Analyzer' ) ) {
        remove_action( 'save_post', [ RANKFORGE_Analyzer::instance(), 'auto_analyze' ], 20 );
    }
}, 20 );

Disabling Image SEO

php
add_action( 'init', function () {
    if ( class_exists( 'RANKFORGE_Image_Seo' ) ) {
        $img = RANKFORGE_Image_Seo::instance();
        remove_action( 'add_attachment', [ $img, 'auto_alt_on_upload' ] );
        remove_filter( 'sanitize_file_name', [ $img, 'clean_filename' ], 10 );
    }
}, 20 );

Disabling All Front-End Output

Keep analysis and admin tools, but let another plugin handle all output:

php
add_action( 'init', function () {
    if ( ! class_exists( 'RANKFORGE_Core' ) ) { return; }

    if ( class_exists( 'RANKFORGE_Meta_Generator' ) )
        remove_action( 'wp_head', [ RANKFORGE_Meta_Generator::instance(), 'output_meta_tags' ], 1 );
    if ( class_exists( 'RANKFORGE_Robots_Meta' ) )
        remove_action( 'wp_head', [ RANKFORGE_Robots_Meta::instance(), 'output_robots_meta' ], 2 );
    if ( class_exists( 'RANKFORGE_Schema' ) )
        remove_action( 'wp_head', [ RANKFORGE_Schema::instance(), 'output_schema' ], 5 );
    if ( class_exists( 'RANKFORGE_Local_Seo' ) )
        remove_action( 'wp_head', [ RANKFORGE_Local_Seo::instance(), 'output_local_schema' ], 6 );
    if ( class_exists( 'RANKFORGE_Video_Seo' ) )
        remove_action( 'wp_head', [ RANKFORGE_Video_Seo::instance(), 'output_video_schema' ], 6 );
    if ( class_exists( 'RANKFORGE_AB_Testing' ) )
        remove_action( 'wp_head', [ RANKFORGE_AB_Testing::instance(), 'maybe_swap_meta' ], 0 );
    if ( class_exists( 'RANKFORGE_Sitemap' ) ) {
        $sitemap = RANKFORGE_Sitemap::instance();
        remove_action( 'init', [ $sitemap, 'register_rewrites' ] );
        remove_action( 'template_redirect', [ $sitemap, 'render_sitemap' ] );
    }
    if ( class_exists( 'RANKFORGE_Robots_Txt' ) )
        remove_filter( 'robots_txt', [ RANKFORGE_Robots_Txt::instance(), 'custom_robots_txt' ], 10 );
}, 20 );

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