WordPress.org

Ready to get started?Download WordPress

Forums

Comments RSS and trackback for static pages? (3 posts)

  1. error
    Member
    Posted 9 years ago #

    A couple of weeks ago I posted about enabling comments to static pages. Now that that's working, I've discovered that neither Comments RSS nor Trackback work for these static pages.
    Before I go digging in the code to try to make this work, I should ask, is this a good idea? SHOULD these be enabled?

  2. schun
    Member
    Posted 8 years ago #

    same problem for me with my wp1.5.
    Any suggestions?
    The problem with RSS feed or trackback for pages is wordpress trackback and rss treats pages and post the same so that it always gives me url that contains .../p=id_number instead of page_id=id_number.. how can I fix this?

  3. schun
    Member
    Posted 8 years ago #

    I was able to fix this problem by modifying the following files.
    1. /wp-includes/comment-functions.php
    Find the function get_trackback_url() and modify the following lines:
    $tb_url = get_settings('siteurl') . '/wp-trackback.php?p=' . $id;
    to
    if(is_page()){
    $tb_url = get_settings('siteurl') . '/wp-trackback.php?page_id=' . $id;
    }else{
    $tb_url = get_settings('siteurl') . '/wp-trackback.php?p=' . $id;
    }

    2. /wp-includes/feed-functions.php
    Find function comments_rss and change the following lines:
    $url = get_settings('siteurl') . "/$commentsrssfilename?p=$id";
    to
    if (is_page()){
    $url = get_settings('siteurl') . "/$commentsrssfilename?page_id=$id";
    }else{
    $url = get_settings('siteurl') . "/$commentsrssfilename?p=$id";
    }

    Hope this helps!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.