Custom Search Page Template

I want to create a custom search template for images, and it will be displayed using The Grid plugin.

To achieve this I am following along here to build the custom search template: https://codex.wordpress.org/Creating_a_Search_Page

And here to edit the search template so it displays as a grid: https://theme-one.com/docs/the-grid/#grid_as_template

But your file and folder structure is a quite unique.

Which files do I need to copy into my child theme to edit for creating a new search template?

Hi There,

Please create the search.php file in your child theme: x-child/search.php

<?php

// =============================================================================
// VIEWS/INTEGRITY/WP-INDEX.PHP
// -----------------------------------------------------------------------------
// Index page output for Integrity.
// =============================================================================

?>

<?php get_header(); ?>

  <div class="x-container max width offset">
    <div class="<?php x_main_content_class(); ?>" role="main">

      <?php if ( have_posts() ) : ?>
      <?php while ( have_posts() ) : the_post(); ?>
      	<?php The_Grid('My Grid Name', true); ?>
      <?php endwhile; ?>
      <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>

  </div>

<?php get_footer(); ?>

Hope it helps :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.