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:

    include( '../wp-load.php' );
    wp_nav_menu( array ( 'menu' => 'Main Menu' ) );

Then here is the code for the BoxBilling Theme:

<div class="main-navigation">
        echo file_get_contents("http://www.glowstonehosting.net/nav.php");

But then in Google Chrome Inspect Element it shows this:

        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


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

WordPress related questions and answers: