So I have been working on a site using the theme Vantage and I am wanting to take the menu from the site and embed in another site in a subdirectory below, I have searched all over the internet trying to find someone who maybe have tried to do something like that but am unsuccessful so I am coming here. Could anyone please tell me how I might be able to do this?

Thanks in advance!

  • I can only see this being done via iframe or maybe trying to access the wp API with something like wp-api.org
    – gdaniel
    Commented Dec 23, 2014 at 16:05
  • @gdaniel Well could you maybe show me how I could do that? Commented Dec 23, 2014 at 16:14

1 Answer 1


There's a couple ways to do this. One way might be to create a file on your web server, load up WP (so you can use its functions) and have it spit out the menu you want at a certain URL, like:


In that file you'd do something like:

      include( './wp-load.php' ); // load up WordPress
      wp_nav_menu( array ( 'menu' => 'whatever' ); // spit out a menu called 'menu'

Then on the other site, you'll want to get the output of that file like:

<?php echo file_get_contents('http://site/nav.php') ?>

That'll spit out the menu where you need it on the second site.

To get it to look right, you'd also have to bring some markup and styles from the other site but that's the gist of it.

Related: wp_nav_menu(); Outside WordPress installation

  • Sure, I've been there. Sometimes you just need a push in the right direction! Commented Dec 23, 2014 at 23:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.