• I am trying to learn a little bit about how WP spits out RSS but I can find no RSS templates anywhere. The files wp-rss2.php and wp-rss.php just seem to have some kind of redirect in them.

    Where are the actual templates? Why dont’ they appear in my theme editor?

Viewing 15 replies - 1 through 15 (of 19 total)
  • Moderator James Huff

    (@macmanx)

    Thread Starter nickaster

    (@nickaster)

    Thanks!

    I’ve been through that and it suggests that there are various “templates included in wordpress” .. wp-rss2.php and so on. But i can’t find any of those anywhere in my installation.

    Am I looking in the wrong places? I’ve literally been through every folder.

    Moderator James Huff

    (@macmanx)

    Those files should be in the same directory as your wp-config.php file.

    Thread Starter nickaster

    (@nickaster)

    Okay, thanks. Right, technically those files are present, but none of them are real files, they have a “depreciation” message and some just some php in them.

    For example, here’s the content of wp-rss2.php:

    <?php
    /**
     * Redirects to the RSS2 feed
     * This file is deprecated and only exists for backwards compatibility
     *
     * @package WordPress
     */
    
    require( './wp-load.php' );
    wp_redirect( get_bloginfo( 'rss2_url' ), 301 );
    
    ?>

    So, where are the real templates? How can i actually get in there to learn anything?

    Moderator James Huff

    (@macmanx)

    Well, that is certainly a problem, and the Codex is just a wee bit out of date there.

    I can research this later, but not from my mobile right now. Maybe someone else here has an idea?

    Thread Starter nickaster

    (@nickaster)

    Thanks! I assume this is normal? I mean, this is the latest download of WP.

    At the end of the day, all I’m trying to do is solve two problems:

    1) The post author is missing from a special RSS feed I set up. I just need to know what to put between <author>…and….</author>

    2) The <description> field – ie, the story body, does not have any line breaks in it.

    I can’t remember where I got the template from that I built the special one with, but I recall someone telling me it was the “normal” RSS template, but maybe it wasn’t. ??

    Thanks for the help so far!

    Moderator James Huff

    (@macmanx)

    You’re certainly right, that is normal, and I have no clue when that changed.

    Here are two similar, yet different, methods for creating custom feeds with today’s WordPress:

    https://yoast.com/custom-rss-feeds-wordpress/

    https://www.seodenver.com/custom-rss-feed-in-wordpress/

    Thread Starter nickaster

    (@nickaster)

    Okay awesome thanks. Yes, I think I must have used one of those examples when I did this.

    Notice that <author> is not included in either example? That’s what’s been driving me nuts!

    How do I get <author> in there?

    Moderator James Huff

    (@macmanx)

    If you use one of the above methods, you could try something like this:

    <author><?php $author = get_the_author(); ?></author>

    https://codex.www.ads-software.com/Function_Reference/get_the_author

    Thread Starter nickaster

    (@nickaster)

    Christ on a popsicle stick…

    Nothing. That code just produces blankness, like this:

    <author></author>

    Why in god’s name is this not some super easy, standard code? It’s just “slap the author’s name in” ….

    Thread Starter nickaster

    (@nickaster)

    I’m fairly sure this is the site where I got the instructions from:

    https://www.livexp.net/wordpress/custom-rss-feeds-in-wordpress.html

    For what it’s worth….

    Moderator James Huff

    (@macmanx)

    Hm, okay then. Try this:

    <author><?php the_author() ?></author>

    Thread Starter nickaster

    (@nickaster)

    yeah, nothing, totally blank again!

    THe templates reside in the wp-includes folder….

    buncha php files that start with feed…. feed-rss2.php for example

    Thread Starter nickaster

    (@nickaster)

    GOD. Thank You.

    So…. in the RSS2 template it seems to use

    <dc:creator><?php the_author() ?></dc:creator>

    instead of <author>.

    Naturally if I use this in the template I created it kills the whole thing… But at least there is something to look at now.

    DOES ANYONE KNOW HOW TO CREATE A CUSTOM RSS FEED IN WORDPRESS????

    The only thing I’m trying to do here is create a FULL FEED rss feed for someone with some minor differences from the main RSS feed. It’s really that simple. I have been working on this for two fucking weeks!!! What the fuck is wrong with this software that makes this so bleeping hard???

    I have found ONE SITE that seems helpful, and it’s only flaw is the lack of <author> and the messed up paragraphs.

    Are there ANY OTHER instructions out there to do this?

    THANK YOU!!!

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Where is my RSS template???’ is closed to new replies.