Support

Account

Home Forums General Issues Share data between pages

Helping

Share data between pages

  • Hi all,

    I know it is possible to share content between pages on the same site using something like:

    
    $page_id = 120;
    if( get_field( 'treatments', $page_id ) ):
    
        while( has_sub_field( 'treatments', $page_id ) ):
    
        endwhile;
    
    endif;
    

    However can something similar be done between pages on different sites?

    Thanks for your time and help in advance.

  • No, not really like this. Unless you connect directly to the other site database using wpdb, look here: Using wpdb to connect to a separate database.

    Otherwise, you could possibly achieve this using the JSON API plugin, but maybe security issue will occurs. There is also a lot of solutions to share content between websites, depending on what you want to share, try to be more specific.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Share data between pages’ is closed to new replies.