• Resolved Rodrigo Lima

    (@rodrigoflausino)


    Hi! Anyone have a snippet or plugin indication to add the Web Story RSS feed to main feed from website?

    For example: “site.com/customfeed” with both main posts (from site.com/feed) AND the web story feed (site.com/web-stories/feed)

    I tried many tutorials and plugins and didn’t found nothing usefull or recent tips.

    I asked this because its interesting to offer both content for RSS readers.

    Thanks in Advanced!

    • This topic was modified 8 months, 1 week ago by Rodrigo Lima.
Viewing 1 replies (of 1 total)
  • Thread Starter Rodrigo Lima

    (@rodrigoflausino)

    Hi! I found a workaround here: https://www.thecreativedev.com/how-to-add-custom-post-type-in-rss-feed/

    And i use the code like this:

    function feed_request($request) {
        if (isset($request['feed']) && !isset($request['post_type'])) :
            $request['post_type'] = array('post','web-story');
        endif;
        return $request;
    }
    add_filter('request', 'feed_request');
     
    function feed_pre_get_posts($query) {
        if ($query->is_feed) $query->set('post_status','publish');
        return $query;
    }
    add_filter('pre_get_posts', 'feed_pre_get_posts');

    I need the suppor for other question, but i open a new thread and close this.

Viewing 1 replies (of 1 total)
  • The topic ‘Add RSS Web Story feed in main feed from site’ is closed to new replies.