[wp-hackers] Access the wordpress menu from another CMS in a subdirectory
Dwain Maralack
dwain.maralack at gmail.com
Thu Jul 5 12:14:15 UTC 2012
I would like to access the wordpress Menu from another Content Management
System.
The code I'm currently using is:
<?php
// no theme output
define('WP_USE_THEMES', false);
$_SERVER = array(
"HTTP_HOST" => "http://localhost:8888/akfam/",
"SERVER_NAME" => "http://localhost:8888/akfam/",
"REQUEST_URI" => "/",
"REQUEST_METHOD" => "GET"
);
// initializes Wordpress
require_once('/Users/miiweb1/Sites/akfam/wp-blog-header.php');
// print menu
wp_nav_menu(array( 'theme_location' => 'primary' ));
?>
More information about the wp-hackers
mailing list