Skip to content

Instantly share code, notes, and snippets.

@killpanda
Created May 24, 2013 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save killpanda/5644567 to your computer and use it in GitHub Desktop.
Save killpanda/5644567 to your computer and use it in GitHub Desktop.
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', FALSE);
/** Loads the WordPress Environment and Template */
require_once('./wp-blog-header.php');
require_once('./wp-load.php');
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('post_type=listings');
echo json_encode($wp_query->get_posts());
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment