Include wp-load.php
, not wp-blog-header.php
. Better yet, hook onto the execution of a standard WordPress request and die early.
isset( $_GET['my_conditional_check'] ) && add_action( 'plugins_loaded', 'my_xml_output' );
function my_xml_output()
{
// do my stuff
exit;
}
This’ll run WordPress, then my_xml_output()
, then die before the request is actually parsed & the template is loaded/rendered:
http://example.com/?my_conditional_check
Related Posts:
- Is it mandatory to use $wpdb->prefix in custom tables
- WordPress and multithreading
- Actions or filters fired when data is saved in a custom table
- Custom Plugin Database relations
- Activation hook not creating table
- $wpdb -> Batch insert from XML File?
- include wp-blog-header not working on MAMP
- How to create database table, add data, update and delete using wpdb via plugins?
- wpdb->prepare and mysql UPDATE – how is it done?
- $wpdb->update Issue
- WordPress database error: [Query was empty] – using $wpdb->prepare()
- How to get inserted row IDs for bulk/batch insert with wpdb query?
- Update database record in plugin
- What method should I use to store my plugin data (multi level menus with options on each item)
- WordPress plugin tables become corrupt
- multiple record insert creating many duplicate records
- Should I use wpdb prepare?
- Post meta vs separate database tables
- Update Option Stored in Multi-Dimensional Array
- Default table collation on plugin activation?
- $wpdb->insert_id
- Using a database view = evil incarnate?
- Check for success of $wpdb->update() correctly
- Writing a plugin that notify my friends of new post that mentions(@) them
- Getting wrong relationship value in $args in wp_Query?
- Not sure the best way to save custom plugin data
- The ideal place for storing persistent PHP objects
- What is the correct way for plugins to create tables with special charset/collation considerations?
- What is the added “complexity” of custom tables?
- Plugin development with unit tests
- How is the data stored in the database?
- Formatting of curly brackets array from WP database to get more readable output
- How to modify post content before writing to database?
- $wpdb->insert is changing a value
- Retrieving custom fields with $wpdb->get_results
- Hello dolly type plugin that allows people to add their own
- Really simple query giving error in SQL syntax
- Sample — test — data for large WordPress install
- Is there any reason only 1 (my) IP would be added to this table using $wpdn->insert?
- why creating tables using $wpdb is not being executed while installing plugins?
- How to use mysql IN statement with wpdb update method?
- How to store data for posts/pages built with drag-n-drop builder?
- Database for development
- Using $wpdb object in a widget
- How to duplicate a curl XML request using HTTP API?
- Is there a naming convention for database tables created by a plugin?
- Is the usage of ON DELETE CASCADE wrong or not allowed on wordpress?
- Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
- Saving data from block editor to the database
- What for the tables ending with the meta used in database of wordpress?
- Creating table with plugin is not working
- dbDelta() Error – Incorrect index name ” for query ALTER TABLE
- How to Download and install plugin database remotely
- Get a custom table to an array
- Update/insert only a column of database table
- How to Create database table when Plugin installed/activated, and delete database when Plugin deleted
- How to insert data to a database table when the field is not yet created?
- Where to store the name of a custom table?
- Subscribe to author?
- I’m designing a plugin to create database indexes. Suggestions?
- creating custom function to log actions in plugin
- WordPress database error for query INSERT INTO
- How to connect to AWS RDS external database (not for the core WordPress db)
- SQL query for custom taxonomy slugs
- Issue regarding $wpdb->prepare()
- How should I store a log for my plugin
- Error on inserting a form value to database
- Are there any scripts, classes, and/or functions built-in to WP for a plugin to export/import its saved data from wp_options?
- Help With MySQL to WPDB Query Conversion
- Failed to Open Stream: Permission Denied While Writing to an XML File in a WordPress Plugin
- Strange issue saving custom field data for a WooCommerce order
- how to search users by ajax live search
- How to perform a heavy and long process in cron jobs?
- Form doesnt save to database
- Adding custom end points, No error line
- Intermittent database errors when accessing WordPress database
- Updating Woocommerce Settings API when WordPress Settings API saved and vise versa
- Update results, Before deleting the related category [closed]
- Storing data in wordpress database from ajax call from different website
- Is using custom table to suit business needs instead of transients a big hit to page load speed?
- Plugin Development for registered users
- Optimising a big WordPress site
- dbDelta SQL Query Not Working
- dbDelta not installing database
- Is it necessary to do validation again when retrieving data from database?
- What is the best way to store a few fields?
- Plugin: database creation
- Adding columns to core tables
- How to query custom db table?
- Delete data from database using row action
- Show dynamic list of products from custom api of another database under same host
- WPDB: Update table
- How do I have now a duplicated user entry if this is not allowed (and I cannot replicate it)?
- Issue running db create table query from static method
- $wpdb->prepare with LIKE and sprintf
- Alternative functions for mysql_free_result and mysql_ping in wordpress functions
- How to optimize multiple insert into wordpress database
- Make Database query only when option is updated
- Can we intercept user_login and user_pass from a wp_login_form?
- $wpdb->update() always need a second try