Advertisement
niammuddin

remove feed wordpress

Feb 10th, 2017
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. function wpb_disable_feed() {
  2. wp_die( __('No feed available,please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!') );
  3. }
  4.  
  5. add_action('do_feed', 'wpb_disable_feed', 1);
  6. add_action('do_feed_rdf', 'wpb_disable_feed', 1);
  7. add_action('do_feed_rss', 'wpb_disable_feed', 1);
  8. add_action('do_feed_rss2', 'wpb_disable_feed', 1);
  9. add_action('do_feed_atom', 'wpb_disable_feed', 1);
  10. add_action('do_feed_rss2_comments', 'wpb_disable_feed', 1);
  11. add_action('do_feed_atom_comments', 'wpb_disable_feed', 1);
  12.  
  13. remove_action('wp_head', 'feed_links_extra', 3 );
  14. remove_action('wp_head', 'feed_links', 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement