The scenario is like, I have two servers:
- Server A : Hosts WordPress
- Server B : Hosts Some PHP Scripts
Now, I want to load the wordpress menu on server B. Is there any way to achieve this? Couldn't find anything helpful.
I have a plan like this, so far:
- Save the complete output of
wp_nav_menu()in the wordpress option table
- From Server B, connect to wordpress database remotely and get the value of the menu from option table, and print that on the PHP page, wrapping with css from the wordpress theme.
Is there any good approach than what I have planned?