• Resolved bizarrogir

    (@bizarrogir)


    I have 2 sites on separate domains, Site1 and Site2, that both have WordPress installed. I have included (PHP INCLUDE) template files from Site1 into Site2. These template files call functions like wp_nav_menu.

    The problem is that the wp_nav_menu function is called for Site2 instead of Site1. Is there a way to set which site I want the WordPress functions to call? Or is there another way to do this?

    Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter bizarrogir

    (@bizarrogir)

    Ok, so I answered my own question. Here’s the answer for anyone needing help in the future:

    In Magento, add this code to your index.php file:

    if ( strpos($_SERVER['REQUEST_URI'], 'index.php/admin') === FALSE ) {
    	define('WP_USE_THEMES', false);
    	require_once($_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php');
    }

    This will tell Magento to call the WordPress that is installed on whatever domain your store is on.

Viewing 1 replies (of 1 total)

The topic ‘Setting WordPress URL for use externally’ is closed to new replies.