• I have been able to integrate the basic code into my site:

    blog

    but the RSS feeds do not work and caused an XML parsing error because it is still outputting the header file in the RSS.

    To integrate the code I modified the index.php file in the blog directory and then included my header and footer files from the root DIR.

    What I don’t get is that when I make an exact copy of the index.php file in the same DIR (blog) and then name it rss.php it runs yet returns no results while the original index.php with the same code returns the blog entries:

    rss.php

    Maybe I’m integrating the site wrong. I just want a simple blog with RSS integrated with the site in a sub folder called “blog”.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hope this saves you the days it took me to figure this one out.

    If you have integrated WordPress into your existing website you need to stop the feed files from continuing to also load your webpage or else your feeds will fail. To do this simply add <?php die; ?> to the end of the feed files. Worked for me and saved me having to create a full WordPress template.

    For for example add it to the end of the RSS 2 feed files /wp-includes/feed-rss2.php and feed-rss2-comments.php (and others) after the closing rss tag </rss>

    </channel>
    </rss><?php die; ?>

    The RSS Feed errors I got while trouble shooting this were:
    – Feeds with DTDs are not supported
    – Cannot have a DOCTYPE declaration outside of a prolog
    – This feed contains errors. Internet Explorer will try updating this feed again later.
    – Extra content at the end of the document

    Some helpful links:
    https://codex.www.ads-software.com/WordPress_Feeds
    https://codex.www.ads-software.com/Customizing_Feeds
    https://codex.www.ads-software.com/Integrating_WordPress_with_Your_Website

    Huge thanks for this solution. Worked perfectly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Integration into existing site, RSS not parsing’ is closed to new replies.