Forums › Forums › Search & Filter Pro › Field relationships not working correct
- This topic has 34 replies, 2 voices, and was last updated 8 years, 4 months ago by Trevor.
-
Anonymous(Private) July 19, 2016 at 7:44 am #51562
Hi Trevor,
This is the code for the search.php file:
<?php get_header(); ?>
<article id=”search-results”>
<div class=”container”>
<div class=”row”>
<div class=”col-sm-3″>
<div class=”search-box”><?php echo do_shortcode(‘[searchandfilter id=”15″]’);?></div>
</div>
<div class=”col-sm-9″>
<?php get_template_part(‘loop’); ?>
<?php get_template_part(‘pagination’); ?>
</div>
</div>
</div>
</article>
<?php get_footer(); ?>Why use a custom template, business decisions. ๐
Anonymous(Private) July 19, 2016 at 8:09 am #51568This is the loop. Nothing special:
<div id="main-filter"> <?php if (have_posts()): while (have_posts()) : the_post(); ?> <a href="<?php the_permalink(); ?>"> <!-- article --> <article id="post-<?php the_ID(); ?>" class="content-items"> <div class="row"> <div class="col-sm-3"> <div class="thumbnail-content-items"> <?php if ( has_post_thumbnail()) : // Check if thumbnail exists ?> <?php the_post_thumbnail(array(120,120)); // Declare pixel size you need inside the array ?> <?php endif; ?> </div> </div> <div class="col-sm-9"> <h2> <?php the_title(); ?> </h2> <?php html5wp_excerpt('html5wp_index'); // Build your custom callback length in functions.php ?> </div> </div> </article> <!-- /article --> </a> <?php endwhile; ?> <?php else: ?> <!-- article --> <article> <h2><?php _e( 'Sorry, nothing to display.', 'html5blank' ); ?></h2> </article> <!-- /article --> <?php endif; ?> </div>
Sorry I didn’t see the code tags.
-
AuthorPosts