This is my first try with custom feeds in WP. So, I’m not sure if this is a Sage or simple WP question.
I created the feed this way:
# filters.php
add_action('init', function () {
add_feed('campaign', 'campaignCallback');
});
function campaignCallback(){
include \App\template_path(locate_template('views/partials/rss-newsletter.blade.php'));
}
# views/partials/rss-newsletter.blade.php
# with same content than wp/wp-includes/feed-atom.php
The feed URL is working but returns empty. It seems like blade template rss-newsletter.blade.php
is not loaded. Could be?
[EDIT] Seems to be a WP issue, not Sage. Sorry for the off topic. Anyway, if anyone can provide a working example of add_feed()
in Sage I will be eternally grateful. I have been diving in documentation for hours, with no luck.