is there a way to aggregate the menu builder for use on another site?
I found an answer for your question in this article http://drewsbox.com/wordpress/wordpress-menu-feeds
Put this in functions.php (please change the parameters for wp_nav_menu)
if ($_SERVER['REQUEST_URI'] == '/menufeed/main')
$expires = 60*30; // seconds * minutes (30 minute cache)
header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT');
$menu = wp_nav_menu(array(
'theme_location' => 'main_menu'
'menu_id' => 'main_menu',
'container' => 'none',
'echo' => 0
// Also escape quotes with addslashes
echo 'document.write("' . addslashes(preg_replace(array('/\n/', '/\t/'), "", $menu)) . '");';
Menus in WordPress are saved in the same table as post. What do you want exactly?
* Copy a menu between different sites
* Copy a menu builder of your theme to another one
both menus on both domains would be synchronized.
so updating wordpress menu would automatically update our shopify menu.
we were thinking that there may be an rss query we could use and read the rss using js. however we're open to other suggestions.
Hi, I can't see in [[LINK href="http://api.shopify.com/"]]Shopify API Documentation[[/LINK]] how menus work but I can tell, how I would do it:
1. Find which hook works when you create a new menu item in WordPress
2. Make a function which is called when this hook triggers
3. The function connect to Shopify using JSON or XML over HTTP
4. Then you send needed data