• Resolved Glazed Donuts

    (@glazed-donuts)


    Is there any way for this plugin to be able to search other websites we specify. It seems, depending on what’s in the “Default Site for Search” box, then that’s what the search engine will search. We have other websites that we would like the search engine to search, and I’ve not been able to figure out how to allow the plugin to do this. We’ve specified the other websites in the Index Template’s section.

    For example, this is what’s going on.

    In the Index Templates section, we have 5 websites we would like the search engine to search:
    1. https://www.websiteA.com
    2. https://www.websiteB.com
    3. https://www.websiteC.com
    4. https://www.websiteD.com
    5. https://www.websiteE.com

    We made sure in the ‘Whitelisted URLs’ section that the 5 websites were there, all separated by commas.

    In the ‘Default Site for Search’ section, we have ‘https://www.websiteB.com’ selected.

    When we try to do a search, it only brings back results from https://www.websiteB.com only and not the other websites.

    Also, I notice when I put anything in the ‘Whitelisted URLs’ section and click ‘Index my site,’ if I go back to the Wizard again, then all of the URLs I put in the box are gone…

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    It defaults to the current site for searching. For indexing, you need to index each site individually.

    Also, the settings below on the wizard for the advanced settings, those are only saved if you choose to create a new index, if you use Reindex then it won’t save. When you load the wizard screen, your settings won’t show up unless you choose to create a new index template (the second drop-down), to use existing settings choose the site from the reindex (the first drop-down).

    To search across sites on the front, try using the shortcode and set the ‘sites’ value to a comma separated list of site IDs.

    For example:

    [search-engine sites="1,2,3,6,7,etc.."]

    Then once you’ve put that shortcode into your page, point you search form at that page for searching. It will search across all site ID’s supplied. Site ID’s can be found in the wp_searchengine_sites table.

    I’ll be adding more advanced features to make this easier in the future, so watch for those.

    Thread Starter Glazed Donuts

    (@glazed-donuts)

    I’m not sure I understand. I added the shortcode [search-engine sites="1,2,3,4,5"] to the main index site of our page (index.php), but the shortcode is showing up.

    Where in the HTML code do I put the information to point it to the index.php page where the shortcode is? Here is the code snippet of the search form on our site:

    <form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
        <div><label class="screen-reader-text" for="s">Search for:</label>
            <input style="width: 100%; height: 30px; font-size: 25px; border: 1px solid black;"  type="text" value="" name="s" id="s" />
            <input style="font-size: 25px; border: 1px solid black;" type="submit" id="searchsubmit" value="Search our website" />
        </div>
    </form>
    Thread Starter Glazed Donuts

    (@glazed-donuts)

    I actually found out what was going on…
    The shortcode is [search_engine sites="1,2,3,4,5"] ..it’s supposed to have an underscore instead of a hyphen.

    Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    You’re right, my mistake there, I used a hyphen instead of an underscore in my reply.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Search Engine] Why is it only searching one website?’ is closed to new replies.