Last active
July 4, 2017 03:53
Revisions
-
ericrasch revised this gist
Apr 7, 2014 . 1 changed file with 0 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,11 +35,4 @@ function my_feed_request($qv) { } add_filter('request', 'my_feed_request'); ?> -
ericrasch revised this gist
Feb 3, 2014 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ <?php /* =BEGIN: Remove WP generated junk from head Source: http://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/ ---------------------------------------------------------------------------------------------------- */ @@ -38,4 +40,6 @@ function my_feed_request($qv) { ********************************************************************************************************************************/ if ( function_exists( 'register_nav_menus' ) ) { register_nav_menus( array( 'main nav' => 'Main Navigation' ) ); } ?> -
ericrasch created this gist
Feb 3, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ /* =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'); /* REGISTER MENUS ********************************************************************************************************************************/ if ( function_exists( 'register_nav_menus' ) ) { register_nav_menus( array( 'main nav' => 'Main Navigation' ) ); }