Answer by sam for Disable only the main feed?
add_filter('request', 'itsme_disable_main_feeds');function itsme_disable_main_feeds($q){ $exit_msg = 'No feed available. Please visit the <a href="%s">homepage</a>.'; $exit_title = 'No Feed...
View ArticleAnswer by Hasin Hayder for Disable only the main feed?
The hook callback needs to check if it's a tag feed, or if it's a category feed or may be if it's a author feed. You can get a lot of information about the feed being produced if you add this two line...
View ArticleAnswer by gmazzap for Disable only the main feed?
This is a modded version of @s_ha_dum answer.I'm agree with him that when in main feed the only variable setted is 'feed' (for posts feed) and 'withcomments' for main comment feed, but instead of...
View ArticleAnswer by Oleg Butuzov for Disable only the main feed?
using rewrite rules you can disable a url pattern that match main feed.add_filter('rewrite_rules_array', 'rewrite_rules_array_feed_disable');function rewrite_rules_array_feed_disable($rules){...
View ArticleAnswer by s_ha_dum for Disable only the main feed?
Very, very quick unscientific research suggests that there is only one query_var set for the main feed. Other feeds such as category, tag, author feeds have more than one query_var. Thus the following...
View ArticleDisable only the main feed?
It's possible to make a site totally inaccessible via feeds (RSS, Atom, RDF) with a function like this:function itsme_disable_feed() { wp_die( __( 'No feed available, please visit the <a href="'....
View Article