0

I have created an XML files that use the same database as WordPress but largely non-WordPress content. I have had these XML files work as RSS feeds on an external domain, but would like to bring this inside of WordPress.

I've created 4 custom feed-name.php templates, include my code and added them to WordPress with the filters etc. they currently return no content because I am unable to access WordPress's functions or my classes in my mu-plugins.

My code includes include('./wp-load.php'); which should allow access to WordPress's functions and my own, but this isn't working.

Have i missed something?

note: including get_header(); breaks the page because it includes loads of html that doesn't validate as xml.

p.s. no custom-template tag?

1
  • should note that the 1 mu-plugin is a class that generates the xml code another is a db access layer that uses the defined host/user/pass from the wp-config. + nothing in my error_log
    – user10914
    Commented Oct 6, 2014 at 20:00

1 Answer 1

0

turns out a minor typo in a method call within a method in the class was causing some confusion.

feeds have to be added to the init action too

  1. function to create feeds
  2. function to add actions
  3. function to init actions function

solved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.