I’m using the Optimizer theme for my main site “landing page” of a network install, with navigation to all the sub-sites from it. One of the features I need, is a network wide search for all sub-sites.
I have a plugin called “wp-search-mu”, which resides in the “mu-plugins” folder in wp-content, it’s a “must use” plugin, as opposed to “inactive”, “active”, etc… It is for adding global, network wide capability to your search. In the search.php, I would normally insert 2 lines of code, 1 after the while instruction, and the other before the endwhile instruction, as such:
<?php if ( have_posts() ) : // Checks if any posts were found. ?>
<?php while ( have_posts() ) : // Begins the loop through found posts. ?>
<?php switch_to_blog($post->blog_id); ?>
<?php the_post(); // Loads the post data. ?>
<?php hybrid_get_content_template(); // Loads the content/*.php template. ?>
<?php restore_current_blog(); ?>
<?php endwhile; // End found posts loop. ?>
Optimizer wp-search.php is using “template_part”, and I cannot find the module that contains “the loop” for processing search records. I could change-up the wp-search.php module, but would rather keep it in line with the structure of the theme. I hope I am explaining my question adequately.
Thanks for the prompt response!