###■目的
ブログのフィードを完全に停止したいのですが、、
###■エラー
下記②のように最後のスラッシュがないURLをfeedlyに入れると、なぜか以前の記事が表示されてしまいます。(>_<)
①http://example.com/feed/
このURLだとfeedlyで記事が表示されなくなる。OK!!
①http://example.com/feed
このURLだとfeedlyで以前の記事を表示してしまう。Why??
###■フィード停止で試した方法
(1)プラグイン「Disable Feeds」を導入
プラグイン自体は機能し、①でも②でもトップページにリンクします。
でも!なぜか!②をfeedlyに入れると記事を表示するのです!
(2)下記コードをfunctions.phpに記載
コード自体は機能し、①でも②でも「feedは停止中です。」が表示されます。
でも!なぜか!②をfeedlyに入れると記事を表示するのです!
php
1/*-------------------------------------------*/ 2/* FEED停止 3/*-------------------------------------------*/ 4 5//// テーマがフィードをサポートしてないことを示す 6function my_remove_feed() { 7 remove_theme_support( 'automatic-feed-links' ); 8} 9add_action( 'after_setup_theme', 'my_remove_feed', 11 ); 10 11//// HTMLのheaderの表示いらない 12remove_action('wp_head', 'feed_links', 2); 13remove_action('wp_head', 'feed_links_extra', 3); 14 15//// なんだっけこれ 16remove_action('do_feed_rdf', 'do_feed_rdf'); 17remove_action('do_feed_rss', 'do_feed_rss'); 18remove_action('do_feed_rss2', 'do_feed_rss2'); 19remove_action('do_feed_atom', 'do_feed_atom'); 20 21//// アクセス時の表示 22function digwp_disable_feed() { 23wp_die( __( '<h1>feedは停止中です。 <a href="' . get_bloginfo('url') . '">サイトへ</a></h1>')); 24} 25add_action( 'do_feed', 'digwp_disable_feed', 1); 26add_action( 'do_feed_rdf', 'digwp_disable_feed', 1); 27add_action( 'do_feed_rss', 'digwp_disable_feed', 1); 28add_action( 'do_feed_rss2', 'digwp_disable_feed', 1); 29add_action( 'do_feed_atom', 'digwp_disable_feed', 1);
そもそもの話、上述のフィード停止方法(1)と(2)をしないで普通に配信している状態でも、スラッシュの有無で取得する記事が変わっています。
feedlyさんはいったいどういうおつもりなのでしょうか??
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。