• marklcfc

    (@marklcfc)


    Basically I want to make use of commerce on another platform.

    I found that from doing the below, it will display the header. But is it at all possible to include all of wordpress elsewhere and have commerce work?

    <?php
    require('wordpress/wp-load.php');
    get_header(); 
    ?>
    
    • This topic was modified 6 years ago by marklcfc.
Viewing 3 replies - 1 through 3 (of 3 total)
  • a2hostingrj

    (@a2hostingrj)

    In the past, I “included” the main menu of a WordPress site in another platform. You have to do more than that.

    For example, let’s say I want to show my WordPress site menu somewhere else, I would create a file called “export_menu.php” and add the following code:

    <?php 
          include( './wp-load.php' );
          wp_nav_menu( array ( 'menu' => 'main' ); 
    ?> 

    Then, on the other site, I would add the following code to use the WordPress site menu:

    <?php echo file_get_contents('http://my-wordpress-example-site.site/export_menu.php') ?>

    However, the CSS or any custom JQuery function will not be included. It has to be done manually. Is it possible? Yes, but it will take time

    Thread Starter marklcfc

    (@marklcfc)

    I did that for the header, and then included it on my site when I was testing.

    I have no idea how to get the whole site showing though, although I only really want the commerce area to show. The header I wouldn’t need, well apart from the basket part.

    I get the impression its not something known to be done.

    • This reply was modified 6 years ago by marklcfc.
    a2hostingrj

    (@a2hostingrj)

    I get the impression its not something known to be done.

    It can be done, it is just gonna be time consuming.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How can I include wordpress on another platform?’ is closed to new replies.