Search page posts 1 post
-
I created a search page template to be a image grid layout rather than the default full width post for 2014 theme. The code outputs only 1 search result when there should be multiple. I am working on my wordpress site locally so I don’t have the link but here is the code:
<?php if (is_search()): ?> <ul class="filterable-grid clearfix"> <li> <a>" > <figure class="bw"> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) : ?> <?php the_post_thumbnail('houses, press, news'); ?> <?php endif; ?> <figcaption> <?php $args = array('number' => '1',); $terms = get_terms('location', $args ); foreach( $terms as $term ){ echo get_the_title() , '</br> ', $term->name; } ?> </figcaption> </figure> </a> </li> <?php $count++; ?> <?php wp_reset_query(); ?> <?php endif ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Search page posts 1 post’ is closed to new replies.