Multisite – Calling Widget From Other Site

This topic contains 2 replies, has 2 voices, and was last updated by  Dave C 9 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #27467

    Dave C
    Expired Member
    Post count: 5

    I’m experimenting with bringing an old Multisite solution I had online again. I was hoping that I could call one of the Post Widgets from my “main” front end site, where as the Geodirectory installation is in another site. I’m certain I can use the switch_to_blog feature and execute some queries to the Database to spit out some raw data, but just wondering if there was an easier solution.

    #27470

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Dave,

    This would be a customisation which is above what a support forum provides, i would however point out that aswell as using switch to blog you might have to redeclare the global variable we use to prefix out custom tables

    $plugin_prefix = $wpdb->prefix.'geodir_';

    I would suggest only changing it for the local widget and then redeclaring it globaly after you are finished with it so that it does not mess with other future calls.

    Thanks,

    Stiofan

    #27529

    Dave C
    Expired Member
    Post count: 5

    Thanks for the input! When I figure it out I will post my code to share for others.

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket