• Resolved nickaster

    (@nickaster)


    I made some changes to feed-atom.php a while ago and it looks like the latest wordpress update to 3.4 over-wrote them. First of all, is this possible?

    Second, what is the right way to customize my RSS? I’ve seen about 100 articles on the topic and I still don’t understand why there is no simple template – in the regular theme folder – that I can edit? Is there any way to do this? Specifically, I’m trying to add a little thumbnail image to my excerpt in the feed, which worked beautifully until my work was over-written (apparently).

Viewing 4 replies - 1 through 4 (of 4 total)
  • It got overwritten because you hacked one of the core files. Here is the link to the correct way to use custom feed templates.

    http://codex.wordpress.org/Customizing_Feeds

    Thread Starter nickaster

    (@nickaster)

    Okay great, thanks!

    So…. any idea how to customize that PHP code to simply replace the default atom template with “xyz.php” ?

    The example is this:

    remove_all_actions( 'do_feed_rss2' );
    add_action( 'do_feed_rss2', 'acme_product_feed_rss2', 10, 1 );
    
    function acme_product_feed_rss2( $for_comments ) {
        $rss_template = get_template_directory() . '/feeds/feed-acme_product-rss2.php';
        if( get_query_var( 'post_type' ) == 'acme_product' and file_exists( $rss_template ) )
            load_template( $rss_template );
        else
            do_feed_rss2( $for_comments ); // Call default function
    }

    But that seems to be something about comments… I can’t figure it out at any rate.

    Thread Starter nickaster

    (@nickaster)

    Anyone with some PHP skills know how to decifer that? It can’t be that complicated….

    Simply … “skip the default Atom feed” and “use this” ….

    Looks to me like there’s a lot more going on in that example!

    Thread Starter nickaster

    (@nickaster)

    Holy cow. I just discovered the Feed Wrangler Plugin. Halleluja. … problem solved.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Custom RSS Feeds question’ is closed to new replies.