EASELとフィード
WordPress標準のフィードURL https://example.com/feed/ は、通常の投稿のみを対象にしている EASEL独自の投稿タイプ「作品」のフィードURLは https://example.com/feed/?post_type=works 標準のフィードURLと統合したい(=「作品」も「投稿」も同じURL https://example.com/feed/ からフィードを取得できるようにしたい)場合は、テーマのための関数 (functions.php) を編集する
code:functions.php
function add_cpt_to_feed( $query ) {
if ( $query->is_feed() && $query->is_main_query() ) {
$query->set( 'post_type', array( 'post', 'works' ) );
}
}
add_action( 'pre_get_posts', 'add_cpt_to_feed' );
作品タイプごとのフィードURLは https://example.com/feed/?custom_cat=作品タイプのスラッグ
スラッグが illust であれば、http://example.com/feed/?custom_cat=illust となる
作品タグごとのフィードURLは https://example.com/feed/?custom_tag=作品タグのスラッグ(多分)