Back to Community

How to Disable All in One SEO Output on Specific Pages or Post Types

24 threads Sep 16, 2025 PluginAll in one seo

Content

Many WordPress users rely on All in One SEO (AIOSEO) to manage their site's metadata, but there are scenarios where you might want to prevent the plugin from outputting its code on certain pages. This could be due to conflicts with other plugins, specific page requirements, or a desire to manually control the SEO tags for a section of your site.

This guide will walk you through the most common methods for disabling AIOSEO's output, using the powerful aioseo_disable filter hook provided by the plugin.

Why Disable AIOSEO Output?

There are several reasons you might need to turn off AIOSEO for specific content:

  • Plugin Conflicts: Other membership, directory, or user profile plugins (like UsersWP or BuddyBoss) might have their own SEO meta tags that conflict with AIOSEO.
  • Manual Control: You may want to hand-code the meta description, Open Graph, or other tags for a particular custom post type or page.
  • Unwanted Defaults: In some cases, the plugin's automatic generation of canonical links or other tags might not be suitable for a specific page structure.

The Primary Solution: Using the aioseo_disable Filter

The most effective way to disable All in One SEO is to use the built-in aioseo_disable filter. This PHP function allows you to conditionally stop the plugin from adding any meta tags to the <head> of your site.

Basic Example: Disable on All Pages

The following code snippet will disable AIOSEO on all WordPress pages, while leaving it active on posts, categories, and other archive pages.

add_filter( 'aioseo_disable', 'aioseo_disable_page_output' );

function aioseo_disable_page_output( $disabled ) {
   if ( is_page() ) {
      return true;
   }
   return false;
}

Advanced Example: Disable on Custom Post Types or Taxonomies

You can also target specific post types or taxonomies. To do this, you will need to know the exact name (slug) of the custom post type. The support team of the plugin that creates the post type can usually provide this information.

add_filter( 'aioseo_disable', 'aioseo_disable_cpt_output' );

function aioseo_disable_cpt_output( $disabled ) {
   // Replace 'my_custom_post_type' with your actual CPT slug
   if ( is_singular( 'my_custom_post_type' ) || is_post_type_archive( 'my_custom_post_type' ) ) {
      return true;
   }
   return false;
}

How to Add This Code to Your Site

Warning: Adding code incorrectly can break your site. Always use a child theme and back up your site first.

  1. Using a Code Snippet Plugin (Recommended): The safest method is to use a plugin like WPCode. This allows you to add custom PHP without editing your theme's files and often includes error checking to prevent site crashes.
  2. Using Your Child Theme's functions.php: You can also add the code to the functions.php file of your child theme. Access this file through your hosting file manager or FTP for the most reliable editing.

Important Considerations

  • This filter completely disables all output from AIOSEO, including titles, meta descriptions, Open Graph tags, schema, and canonical links. Ensure you have an alternative method for providing this data if it's needed for SEO.
  • If you only want to remove a specific tag (like the author from schema or the meta description), a different, more targeted filter may be more appropriate than disabling everything.
  • Always clear your site and server cache after implementing code changes to see the results.

By using the aioseo_disable filter, you can precisely control where All in One SEO operates, resolving conflicts and giving you flexibility over your site's SEO structure.

Related Support Threads Support