ericrasch
2/3/2014 - 10:47 PM

Add this code to your Theme's functions.php file.

Add this code to your Theme's functions.php file.

<?php 

/* =BEGIN: Remove WP generated junk from head
    Source: http://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/
   ---------------------------------------------------------------------------------------------------- */
function removeHeadLinks() {
    remove_action( 'wp_head', 'rsd_link' );
    remove_action( 'wp_head', 'wp_generator' );
    remove_action( 'wp_head', 'wlwmanifest_link' );
    remove_action( 'wp_head', 'feed_links_extra', 3 );
    remove_action( 'wp_head', 'feed_links', 2 );
}
add_action('init', 'removeHeadLinks');


/**
 * Create custom RSS feed links (as to not include all the extras)
 * Source: http://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/#comment-3980
 */
function my_custom_feeds() {
    $custom_feed_url = get_bloginfo('rss2_url');
    echo '<link rel="alternate" type="application/rss+xml" title="' . get_bloginfo('name') . ' RSS Feed" href="' . $custom_feed_url . '" />' . "\n";
}
add_action('wp_head', 'my_custom_feeds');


/**
 * Add Custom Post Types/Pages to your main WordPress RSS Feed
 * Source: http://www.wpbeginner.com/wp-tutorials/how-to-add-custom-post-types-to-your-main-wordpress-rss-feed/
 */
function my_feed_request($qv) {
    if (isset($qv['feed']) && !isset($qv['post_type']))
        $qv['post_type'] = array('page', 'careers');
    return $qv;
}
add_filter('request', 'my_feed_request');

?>