How to Setup Global Site Tags and Search not on the Main Site

Hi. I've kind of half asked this same question at the end of another thread here:
but thought I'd start a new one as its a fresh question.

On our multi-site install, we want to create a site called search.oursite.com and run both the global search and global tags from there instead of our main site.

Can this be done? If so, what code do I need to change?
I'm assuming it's something like this in wp-config:
define( 'GLOBAL_SEARCH_BLOG', 18 ); or something like that.

thanks in advance

  • Vaughan
    • Support/SLS MockingJay

    hiya

    that's an excellent question.

    Unfortunately, i'm not sure that's currently possible.

    you might be able to use the widget, the the page slug will be created on the main blog only.

    I don't see any defines in the code which you can add to change this.

    you can change the slug, but not the blog.

    though i think you could use the widget on subsites.

    let me just ping the developer to see if he can maybe allow this in a future update.

    hope this helps

  • Eugene Manuilov
    • Syntax Hero

    Hi @member1

    I have implemented such ability for Global Site Tags plugin. Also I have just released the new version of it. So could you please upgrade your plugin and add following line to your wp-config.php file?

    define( 'GLOBAL_SITE_TAGS_BLOG', 1 /*put your blog id here*/ );

    Please, let me know how it works for you.

    Thanks,
    Eugene

  • Eugene Manuilov
    • Syntax Hero

    Hi @member1

    I have just released the new version of Global Site Search plugin. This version has to allow you to use the plugin on sub sites. All you need to do is just add following snippet to your wp-config.php file:

    define( 'GLOBAL_SITE_SEARCH_BLOG', 10 );

    Pay attention that you need to pass your blog ID instead of 10 value in the snippet above. You can also set multiple blogs by adding comma separated list of IDs, like this:

    define( 'GLOBAL_SITE_SEARCH_BLOG', '10,11' );

    Please, let me know if it helps.

    Regards,
    Eugene

  • member1
    • The Incredible Code Injector

    Hi Eugene.
    Sorry for the big delay. I'm just getting around to testing this now.

    Assigning the blog ID works well. My chosen site/blog auto creates the 'site-search' and 'tags' pages ok.

    All of my content is locked down for admin only, so i've opened up one site to test.
    Unfortunately, it only works on fresh content AFTER the site is made 'live' not past content. Is there a way around this? I tried re-publishing a post and that seemed to work ok one post I tested.

    Results: Site Search - search.mysite.com/site-search
    In site search it doesnt seem to pull results for all content in that re-published post however, only a few words. But the results it does display look good and the theme we use shows the avatar of the author as well, so thats good.

    Results: Tags page - search.mysite.com/tags/
    I added a tag on the re-published post and it showed on the tags page.
    Clicking the tag listed on the tag results page brought up this page
    - search.mysite.com/tags/tagname/ which showed results which linked to the MAIN BLOG - which it shouldn't have done. (i.e. mysite.com/tags/tagname/)
    So there seems to be a reference to the main blog still.

    Getting there though. I hope you are able to find a way to continue to improve/fix.

    Thanks for your help so far.

    Paul

  • Jim
    • Site Builder, Child of Zeus

    I'd be interested in current status of above, especially for Global Site Tags, which I'd like to be accessible via multiple additional sites (such as you apparently have for Global Site Search), with both tag cloud and tag feed (i.e., links from tag cloud) appearing on these additional sites and not redirecting to main site. Has the functionality been confirmed, bug addressed, etc.?

    Many thanks,

    Jim P.

  • Paul
    • The Green Incsub

    @Jim,

    Greetings. I've just recently inherited these plugins from the previous developer who left the company. Have not really had a chance to review and/or prioritize the backlog of feature requests. Mainly focusing on bugs and investigating reported issues. Hopefully myself or someone will get to these requests soon. Thanks.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.