Calling wp outside of the loop
-
Anyone know how to call WP code outside of the loop? For example, calling a wp-coded php file via ajax.
In the past, and up to 2.9.2, I believe, could use:
<?php // Include WordPress define('WP_USE_THEMES', false); require_once('PATHHERE/wp-blog-header.php'); query_posts('showposts=1'); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Calling wp outside of the loop’ is closed to new replies.