Global Search Widget on Network Theme

I'm using the Network Theme and it seems to have a search bar built right into the header, however, if a visitor uses this search box it doesn't return results from across the network I have therefore installed Global Site Search which works just fine.

Two questions:

1. Can I disable the Network Theme search or do I just need to remove that code from my child theme's header.php?

2. Can Global Site Search be used as a widget (or even to replace the standard search code in header.php) so that every page has the search option? I don't want my visitors to have a two-click process to begin searching (i.e. I would have to have a link on each page to the site-search page).

To replicate my challenge, go to

its42.net and enter Alabama in the "search for" box - no results are found.

Go to its42.net/site-search/ and try the same search...

thanks :slight_smile:
Ian.

  • Patrick
    • Support Monkey

    Hi @Ian - Blink Colony

    Yup, the most update-proof way to replace the default search form from the theme with the form from the plugin is to add the plugin-generated code to the header.php template of the child-theme.

    You can grab the code from the search page that the plugin creates, and add that to the template.

  • Ian - Blink Colony
    • Site Builder, Child of Zeus

    Thanks Patrick, that worked like a charm. By viewing the source code of the site-search page I was able to grab the code that was in <form> and simply pasted it into my child header.php

    That leads to a follow up question. I now need to do something with the search box that remains (the non-network one).

    I traced it to the header files in /library/components/

    Is there a way to create child theme versions of these files or do I make my changes in those directories and then amend them each time there is a theme upgrade?

    Many thanks
    Ian.

  • Patrick
    • Support Monkey

    Hi again @Ian - Blink Colony

    Yes. WordPress always looks for the files/templates it needs in a child-theme first if one is being used.

    As long as you reproduce the exact folder structure in the child-theme when copying files from the parent, the files located in the child will be used.

    I'm going to go ahead and mark this thread as resolved for now. But if you still need more help on this, simply re-open the thread by ticking the Mark as Not Resolved (re-open) box below.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.