Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Search & Filter Pro
- *
- * Sample Results Template
- *
- * @package Search_Filter
- * @author Ross Morsali
- * @link http://www.designsandcode.com/
- * @copyright 2015 Designs & Code
- *
- * Note: these templates are not full page templates, rather
- * just an encaspulation of the your results loop which should
- * be inserted in to other pages by using a shortcode - think
- * of it as a template part
- *
- * This template is an absolute base example showing you what
- * you can do, for more customisation see the WordPress docs
- * and using template tags -
- *
- * http://codex.wordpress.org/Template_Tags
- *
- */
- if ( $query->have_posts() )
- {
- ?>
- <div class="pagination">
- <div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
- <div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div>
- <?php
- /* example code for using the wp_pagenavi plugin */
- if (function_exists('wp_pagenavi'))
- {
- echo "<br />";
- wp_pagenavi( array( 'query' => $query ) );
- }
- ?>
- </div>
- <?php
- while ($query->have_posts())
- {
- $query->the_post();
- ?>
- <div class="search-posts-result <?php the_author(); ?>">
- <a href="<?php the_permalink(); ?>" target="_blank" class="search-results-image"></a>
- <?php
- if ( has_post_thumbnail() ) {
- echo '<p>';
- the_post_thumbnail("small");
- echo '</a></p>';
- }
- ?>
- <h2><a href="<?php the_permalink(); ?>" target="_blank"><?php the_title(); ?></a></h2>
- <div class="search-posts-date"><?php the_date(); ?></div>
- <div class="search-posts-content"><?php content('30'); ?> <a href="<?php the_permalink(); ?>" target="_blank"><span class="read-more-link">Read more...</a></span></div>
- <div class="search-posts-author">from <?php the_author(); ?></div>
- </div>
- <?php
- }
- ?>
- <?php
- }
- else
- {
- echo "No Results Found";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment