I've built a custom archive page within Wordpress
using Timber
and the Route method. The page works well and shows a combination of Custom Post Types
but the feed at {url}/feed doesn't exist.
note: Previous answer has been edited to remove confusing side issues.
// create CPT (x 3)
register_post_type($name, array(
'label' => 'custom1',
'public' => true,
'capability_type' => 'page',
'supports' => array( 'title', 'author', 'excerpt', 'revisions', 'thumbnail'),
'taxonomies' => array('post_tag'),
'has_archive' => true
));
// CPT route
Routes::map('test/filter/:filter', function($params){
$query = array(
'post_type' => array('custom1', 'custom2', 'custom3' )
);
$filter = $params;
Routes::load('archive.php', $filter, $query, 200);
});
// paging CPT route
Routes::map('test/filter/:filter/page/:page', function($params){
$query = array(
'post_type' => array('custom1', 'custom2', 'custom3' ),
'paged' => intval($params['page'])
);
$filter = $params;
Routes::load('archive.php', $filter, $query, 200);
});