Is there any way to check whether the user has an SEO plugin installed, so as if they do not I can insert my metas etc.


Hi @Liam:,

What you are going to need to do is create a list of the top SEO plugins and themes and then document how each implements meta and develop a strategy for each. And/or maybe you can ask your users upon activation if they are using an SEO plugin much like Akismet asks users to enter an API key.

  • Aha, good idea. And I can add an option to disable my theme's SEO functionality. Feb 4 '11 at 9:28
  • @Liam Bailey: Glad I could help! Feb 4 '11 at 11:59

You can use the plugin folder name + filename where the plugin is initiated like this for example YOAST plugin:

if(in_array('wordpress-seo/wp-seo.php', apply_filters('active_plugins', get_option('active_plugins')))){ 
    /* Yoast is active */

OR find the main class of the plugin and check agains that like:

    /* Yoast is active */
    if(WPSEO_Options::get('breadcrumbs-enable', false)){
        /* Yoast breadcrumbs is active */

You can check for specific plugin(s), for example with is_plugin_active() function.

But there is no way to check for SEO plugin in general, at least not in any kind of reliable way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.