Support » How-To and Troubleshooting » php including WP has messed up my feed URLs please help?

php including WP has messed up my feed URLs please help?

  • Hello, I’ve got WP up and running and I think it’s great, but I think by trying to be clever I have managed to mess something up a little bit. I was struggling to style WP to match my site, and eventually decided to include the WP index.php file into a template of my site including navigation etc. This has worked from a styling point of view, but what it has appeared to have done is mess up the feed URLs that WP generates. I thought at first that I had worked around this, by manually changing the URLs in footer.php etc. to point to wp-rss2.php instead of the php code that they are by default. The problem I’m having now is that when I create a post, the RSS feed that is generated doesn’t work. What do I need to do to fix this? I’m a newb with php, but I can follow instructions well and I’m a quick learner. I’d really appreciate any help.

    Thanks in anticipation! Rory

Viewing 3 replies - 1 through 3 (of 3 total)
  • Ok, I’ve searched and searched over the last hour or so and I think I have solved at least the “me being clever” part. I changed the WP index.php file back to how it was and added require('./navigation.php'); to it, with navigation.php being a file that I created with all the other stuff I wanted to “include” included within. The layout is as I want now. Then I changed back the RSS feed URLs within header.php and footer.php from absolute to <?php bloginfo('rss2_url'); ?> as it originally was. For some reason now though when this redirects to “feed:http://www.mydomain.com/blog/feed/” i get an error page. Please help, I promise to learn from my mistakes…

    You probably need to remove “feed:” from those links – most browsers are still not really ready to use that protocol.

    Thanks for the reply… I’m using Safari, and I’ve also been testing with Firefox, so I assume that is not an issue? From the little I understand about php, it is WP that is creating that link with the code <?php bloginfo('rss2_url'); ?> which translates to “feed:http://www.mydomain.com/blog/feed/“, so I can’t remove “feed:” can I?

    I’ve resorted back to absolute linking “/installdirectory/wp-rss2.php” in header.php and footer.php again after some more troubleshooting, and just removing the “subscribe to replies” link from the single.php and attachment.php pages. This is not ideal, but at least it’s working. Any more ideas?

    I think part of the problem in adding the include page to index.php is that it inserts it before the header tags, and it inserts it into the code of the generated RSS feed which causes it to not validate. I read somewhere on here that to include a page it should be be added to wp-blog-header.php but I couldn’t work out how or where to include it. That’s where my newbie-ness to php becomes a little frustrating. I experimented with require('./navigation.php');, as it is in the index.php, but it didn’t work… Hmmm

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘php including WP has messed up my feed URLs please help?’ is closed to new replies.