• Resolved anwoke8204

    (@anwoke8204)


    HI, I am trying to figure out how I can use one gallery that was made on site on our multisite installation on another site on the multisite installation. I have searched and there seems to be some conflicting information, so im looking for the best way to accomplish this.

    I have galleries at https://media.usswhitebuffalo.org that I want to display on https://artemis.usswhitebuffalo.org. I would rather not create the galleries twice if I can avoid it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Imagely

    (@imagely)

    @anwoke8204 – Please have a look at the following, adjust appropriately for your installation:

    add_filter('ngg_datamapper_table_name', 'something', 10, 2);
    function something( $table_name, $name ) {
      global $table_prefix;
      if ( strpos( $table_name, ‘ngg' ) !== FALSE ) {
        return $table_prefix . $name;
      }
    }

    The callback function is noted as “something” use whatever is most appropriate for your installation.

    The return value of $table_prefix . $name will return by default the main WordPress installation site, if you want to use a different sub-site then set the $table_prefix appropriately, for example, site 3 would use wp_3_ as the $table_prefix

    Also to note, all images should be uploaded to the specific site being used for all the other sub-sites.

    Thanks!

    – Cais.

    Thread Starter anwoke8204

    (@anwoke8204)

    Hi, where do I find that code at, so I can change it, or how do I run that code?

    Plugin Contributor Imagely

    (@imagely)

    @anwoke8204 – You would need to add the code where it would affect all sites for your multisite installation. Configuration and implementation of custom code is not something we provide extensive support for, especially under multisite environments.

    Thanks!

    – Cais.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Use same gallery on 2 multisite sites’ is closed to new replies.