Created
January 23, 2019 20:53
-
-
Save arifhazwan/fc579bec45623a249e507da73442ccf0 to your computer and use it in GitHub Desktop.
Wordpress Disable Feed
This file contains 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 characters
function wpfeed_disable() { | |
wp_die( __( 'Not available, check out <a href="'. esc_url( 'https://www.facebook.com/' ) .'">Facebook</a>!' ) ); | |
} | |
add_action('do_feed', 'wpfeed_disable', 1); | |
add_action('do_feed_rdf', 'wpfeed_disable', 1); | |
add_action('do_feed_rss', 'wpfeed_disable', 1); | |
add_action('do_feed_rss2', 'wpfeed_disable', 1); | |
add_action('do_feed_atom', 'wpfeed_disable', 1); | |
add_action('do_feed_rss2_comments', 'wpfeed_disable', 1); | |
add_action('do_feed_atom_comments', 'wpfeed_disable', 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment