Forums › Forums › Search & Filter Pro › changing the search results template
- This topic has 11 replies, 2 voices, and was last updated 8 years, 2 months ago by Anonymous.
-
Anonymous(Private) September 15, 2016 at 2:50 pm #58077
results.php template. One column and the images are too big.
unfortunately i have not hosted the site yet. i would have given the url. I will share the code.I would like to make the plugin use search.php for the display. it’s more organized.
search.php
<?php if ((function_exists('accesspress_pro_breadcrumbs') && $accesspress_pro_show_breadcrumb == 0) || empty($accesspress_pro_show_breadcrumb)) { accesspress_pro_breadcrumbs(); } ?> <h1 class="entry-title ak-container"><?php printf( __( 'Search Results for: %s', 'accesspress_pro' ), '<span>' . get_search_query() . '</span>' ); ?></h1> </header><!-- .page-header --> <div class="ak-container"> <div id="primary" class="content-area"> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <?php /** * Run the loop for the search to output the results. * If you want to overload this in a child theme then include a file * called content-search.php and that will be used instead. */ get_template_part( 'content', 'summary' ); ?> <?php endwhile; ?> <?php accesspress_pro_paging_nav(); ?> <?php else : ?> <?php get_template_part( 'content', 'none' ); ?> <?php endif; ?> </div> <?php get_sidebar('right'); ?> </div> <?php get_footer(); ?>
Anonymous(Private) September 20, 2016 at 8:44 am #58927Hi Trevor,
I managed to sort the issue. Your results.php display formart is in paragraphs. so I edited the code introduced divs and it worked.
I hope any other person having the problem can now sort it.
`?>
<div class=”row”>
<div class=”col-3″>
<?php
if ( has_post_thumbnail() ) {
echo ‘<p>’;
the_post_thumbnail(“small”);
echo ‘</p>’;
}
?></div>
<div class=”col-9″>
<div class=”col-5″>
<div><h2>“><?php the_title(); ?></h2></div>
<?php the_excerpt(); ?></div>
</div>
</div>
<p><?php the_category(); ?></p>
<p><?php the_tags(); ?></p>
<p><small><?php the_date(); ?></small></p> -
AuthorPosts