• Resolved SoItBegins

    (@soitbegins)


    I’m coding a plugin. One particular file of this plugin is supposed to pull data from the plugin’s custom DB table, and output it with minimal processing as raw XML.

    The problem is, to get the WPDB class to work when the file was opened directly, I had to add a require to wp-blog-header.php. This worked great BUT it turns out that including the file outputs the tags <html>, <head>, and <body>, which kinda screws up certain parts of the XML.

    Is there any way I can
    [A] Suppress the tag-spitting behavior of wp-blog-header.php?
    [B] Get WPDB working in some other way?

    Or should I just not use WPDB for DB access in this file in the plugin?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Using WPDB to output raw XML fails because of wp-blog-header.php’ is closed to new replies.