Yoast SEO Plug In and my Theme duplicating code. Need some feedback on what to do? [closed]

As far as my usage with Yoast’s WordPress SEO plugin goes, I thought always assumed the plugin simply replaced any existing code with what it generates for that same purpose.

If you are using the plugin and don’t want to disable it, then simply go into your header.php file and delete/comment-out any meta tags that are generating the duplicate code. However, some of those are automatically generated by WordPress, so add this code block to your functions.php file and you should be good to go. In theory.

// cleans up unnecessary header links
remove_action('wp_head', 'feeds_links_extra', 3);
remove_action('wp_head', 'feed_links', 2);
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'parent_post_rel_link', 10, 0);
remove_action('wp_head', 'start_post_rel_link', 10, 0);
remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
remove_action('wp_head', 'wp_generator');

The above code along with the following code from my header.php file cleans everything up nicely:

<!DOCTYPE html>
<!--[if lt IE 7]><html class="ie ie6 no-js" <?php language_attributes(); ?>><![endif]-->
<!--[if IE 7]><html class="ie ie7 no-js" <?php language_attributes(); ?>><![endif]-->
<!--[if IE 8]><html class="ie ie8 no-js" <?php language_attributes(); ?>><![endif]-->
<!--[if IE 9]><html class="ie ie9 no-js" <?php language_attributes(); ?>><![endif]-->
<!--[if gt IE9]><html class="no-js" <?php language_attributes(); ?>><![endif]-->
<head>

    <title><?php wp_title(''); ?></title>

    <meta charset="https://wordpress.stackexchange.com/questions/44078/<?php bloginfo("charset'); ?>" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

    <link rel="stylesheet" href="https://wordpress.stackexchange.com/questions/44078/<?php bloginfo("stylesheet_url'); ?>" />
    <link rel="pingback" href="https://wordpress.stackexchange.com/questions/44078/<?php bloginfo("pingback_url'); ?>" />

    <?php wp_head(); // all scripts should be loaded in functions.php ?>

</head>
<body <?php body_class(); ?>>

    <header>
        <h1><a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a></h1>
    </header>

I hope this helps you out, please let me know if you have further questions! 🙂 Also, on a side note, if you (or anyone else) needs a good source for how to properly setup the WordPress SEO plugin, check out this excellent tutorial.