I am trying to integrate a WordPress menu into a Boxbillng theme, but the problem is the PHP code I am using isn’t being parsed at all.
Here is the code that gets the WordPress menu:
<?php include( '../wp-load.php' ); wp_nav_menu( array ( 'menu' => 'Main Menu' ) ); ?>
Then here is the code for the BoxBilling Theme:
<div class="main-navigation"> <?php echo file_get_contents("http://www.glowstonehosting.net/nav.php"); ?> </div>
But then in Google Chrome Inspect Element it shows this:
<!--?php echo file_get_contents("http://www.glowstonehosting.net/nav.php"); ?-->
So they’ve all been commented out, I also tried one of the answers from another question simlilar to this: php in .phtml file not parsing
The only answer suggested adding this to the WordPress .htaccess:
AddType application/x-httpd-php .php .phtml
Which still didn’t work so does anyone have any ideas?
Thanks in advance!
Read more here: PHP Code Not Working in PHTML File