Created
September 20, 2019 02:20
-
-
Save ma2i/a8271ca8da61a2622d0912d506a8d1fa to your computer and use it in GitHub Desktop.
【WordPress】子テーマに設置したカスタマイズしたRSSを優先する設定
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
/* RSSは、子テーマに設置した「feed-rss2.php」を優先する設定 */ | |
remove_filter('do_feed_rss2', 'do_feed_rss2', 10); | |
function custom_feed_rss2(){ | |
$template_file = '/feed-rss2.php'; | |
load_template(get_stylesheet_directory() . $template_file); | |
} | |
add_action('do_feed_rss2', 'custom_feed_rss2', 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment