I want to run wp_query on a separate php file for an ajax call

前端 未结 4 403
难免孤独
难免孤独 2021-01-03 00:43

For example:






        
4条回答
  •  伪装坚强ぢ
    2021-01-03 01:19

    You can turn the template engine off and then include the header.
    // Include WordPress
    define('WP_USE_THEMES', false);
    require_once('PATHHERE/wp-blog-header.php');

提交回复
热议问题