WordPress.org

Ready to get started?Download WordPress

Forums

Permalink - Comments feed (5 posts)

  1. ericthibeault
    Member
    Posted 6 years ago #

    Hi there,

    I didn't find in the doc what is the path of the comments feed when I use permalinks. With wordpress default hierarchy the path of the comments feed is wp-commentsrss2.php, but i don't know what to use with the permalink hierarchy.

    For the rss2 and atom feeds I simply use the /feed/rss2/ and /feed/atom/.

    Thanks

  2. moshu
    Member
    Posted 6 years ago #

    example.com/comments/feed

    displayed by:
    <?php bloginfo('comments_rss2_url'); ?>

  3. ericthibeault
    Member
    Posted 6 years ago #

    Thanks moshu,

    It seems to work (the link) but it seems that there's a bug. Do you know what can be the problem?

    I didn't touch the comments feed's page since I installed WordPress.

    XML Parsing Error: junk after document element
    Location: https://www.example.com/it/is-instructions/comments/feed/
    Line Number 4, Column 10:			</div><?xml version="1.0" encoding="UTF-8"?>
    ------------------------------^

    Thanks

  4. moshu
    Member
    Posted 6 years ago #

    That's not "bug". That's bad code in your blog, as the error message says: junk...

  5. ericthibeault
    Member
    Posted 6 years ago #

    Why then - when I simply put /feed/rss2/ on the single post - it shows "comments for... (the post title)". It makes me think that the comment template file is ok.

    Also the wp-commentsrss2.php file only contains:

    <?php
    
    if (empty($wp)) {
    	require_once('./wp-config.php');
    	wp('feed=rss2&withcomments=1');
    }
    
    require (ABSPATH . WPINC . '/feed-rss2-comments.php');
    
    ?>

    How then can it contains bad code?

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic