Genesis: Disable SEO Functions

function genesis_disable_seo_functons() { 
    remove_filter('wp_title', 'genesis_default_title', 10, 3); 
    remove_action('get_header', 'genesis_doc_head_control'); 
    add_action('wp_head', 'rel_canonical'); 

    remove_action('admin_menu', 'genesis_add_inpost_seo_box'); 
    remove_action('save_post', 'genesis_inpost_seo_save', 1, 2); 

    remove_action('admin_init', 'genesis_add_taxonomy_seo_options'); 
    remove_action('edit_term', 'genesis_term_meta_save', 10, 2); 

    remove_action('show_user_profile', 'genesis_user_seo_fields'); 
    remove_action('edit_user_profile', 'genesis_user_seo_fields'); 
    remove_action('personal_options_update', 'genesis_user_meta_save'); 
    remove_action('edit_user_profile_update', 'genesis_user_meta_save'); 

    add_filter('pre_option_' . GENESIS_SEO_SETTINGS_FIELD, '__return_empty_array'); 

2 thoughts on “Genesis: Disable SEO Functions”

  1. Hello

    I want to change genesis seo title, genesis seo description by do shortcode, but my code not working on this pharse.

    I using code: add_filter(‘genesis_seo_title’,’do_shortcode’);

    • Hi. Why do you want to use do_shortcode? do_shortcode() is a function that allows the use of shortcodes in PHP and has its own parameters. It is a core WordPress function and can not be overwritten.

      The genesis_seo_title and genesis_seo_description filters can take 3 parameters: $title, $inside, $wrap. To use genesis_seo_title filter, you can do something like this:

      add_filter( 'genesis_seo_title', 'my_new_seo_title', 10, 1 );
      function my_new_seo_title( $title ) {
          $title = '

      My New SEO Title

      '; return $title; }

      OR this:

      add_filter( 'genesis_seo_title', 'my_new_seo_title', 10, 3 );
      function my_new_seo_title( $title, $inside, $wrap ) {
          $inside = sprintf( '%s', esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
          return sprintf( '<%1$s class="site-title">%2$s', $wrap, $inside );

Leave a Comment