Skip to main content
added 11 characters in body
Source Link

I have a wordpress website and I want to use wordpress menu outside the installation.

So I created a file called nav.php and put the following code

  include( '../wp-load.php' ); 
  wp_nav_menu( array( 'theme_location' => 'primary','menu_id' =>   'cartel' ) ); 

In the header on another website,

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

This ignores the custom menu itemsitem having custom link created in the wordpressWordPress menu. Please help. for example (SHOP [/shop/])

I have a wordpress website and I want to use wordpress menu outside the installation.

So I created a file called nav.php and put the following code

  include( '../wp-load.php' ); 
  wp_nav_menu( array( 'theme_location' => 'primary','menu_id' =>   'cartel' ) ); 

In the header on another website,

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

This ignores the custom menu items created in the wordpress menu. Please help. for example (SHOP [/shop/])

I have a wordpress website and I want to use wordpress menu outside the installation.

So I created a file called nav.php and put the following code

  include( '../wp-load.php' ); 
  wp_nav_menu( array( 'theme_location' => 'primary','menu_id' =>   'cartel' ) ); 

In the header on another website,

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

This ignores the menu item having custom link created in the WordPress menu. Please help. for example (SHOP [/shop/])

Source Link

Calling wordpress menu outside ignores custom menu item

I have a wordpress website and I want to use wordpress menu outside the installation.

So I created a file called nav.php and put the following code

  include( '../wp-load.php' ); 
  wp_nav_menu( array( 'theme_location' => 'primary','menu_id' =>   'cartel' ) ); 

In the header on another website,

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

This ignores the custom menu items created in the wordpress menu. Please help. for example (SHOP [/shop/])