Forums › Forums › Search & Filter Pro › Display results in a grid view
- This topic has 4 replies, 2 voices, and was last updated 8 years, 4 months ago by Trevor.
-
Anonymous(Private) July 20, 2016 at 7:15 pm #51747
Hi, is there a way to display results in a grid view after searching? I’m using Enfold as a theme but styling is not a big priority, however it would be great if I could apply the theme style to the grid results as well. But at this point, I would just like to be able to view results as a grid.
Thanks!
Trevor(Private) July 21, 2016 at 11:14 am #51794It depends on what template is being used for the results. If you are using the shortcode method, it uses our results.php template. You can edit this to give you a grid (you can modify it to look and behave like a theme template). If you are using as an archive or Post Archive methods, they use your theme’s templates, in which case uses one that has a grid.
Anonymous(Private) July 21, 2016 at 3:54 pm #51832Trevor, thanks for the reply. I’m using the shortcode method. I’d appreciate it if you can tell me how to work with the results.php file.
I managed to find the follow code from the Enfold forum:
<?php global $avia_config; /* * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory. */ get_header(); $results = avia_which_archive(); echo avia_title(array(‘title’ => $results )); ?> <div class=’container_wrap container_wrap_first main_color <?php avia_layout_class( ‘main’ ); ?>’> <div class=’container’> <main class=’content template-search <?php avia_layout_class( ‘content’ ); ?> units’ <?php avia_markup_helper(array(‘context’ => ‘content’));?>> <div class=’page-heading-container clearfix’> <section class=”search_form_field”> <?php echo “<h4>”.__(‘Andere zoekopdracht’,’avia_framework’).”</h4>”; echo “<p>”.__(‘Vul hier Uw nieuwe zoekopdracht in:’,’avia_framework’).”</p>”; get_search_form(); echo “<span class=’author-extra-border’></span>”; ?> </section> </div>
Do you know exactly where in the results.php template that I can paste this into? Or would this code even work in the first place if I want to display the results as a grid?
I’m assuming I would need to place the above code at some place in this section, correct?
<?php while ($query->have_posts()) { $query->the_post(); ?> <div> <h5><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5> <br> </div> <hr />
Thanks for your help!
-
AuthorPosts