Forums Forums Search & Filter Pro changing the search results template

Viewing 10 posts - 1 through 10 (of 12 total)
  • Anonymous
    #58060

    Hi,
    How do i remove results.php for the plugin and make it use the default search.php for the theme?

    Trevor
    #58067

    What display results method are you using?

    Anonymous
    #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
    #58093

    Sorry. my results display method is use of shortcode.

    Trevor
    #58107

    What we need to do is to customize the results.php to make it behave like you search.php template. This is possible, but I would need some free time. Is the site on localhost, a staging site or a live web site?

    Anonymous
    #58111

    The site is on localhost.

    Trevor
    #58115
    This reply has been marked as private.
    Anonymous
    #58123

    Am cool. What of team-viewer?
    UTC+03:00 timezone.

    Alternatively i can host it with WordPress then give you the URL.

    Trevor
    #58135

    I do not use Team Viewer, only Skype. I can do it using a WordPress site, but I prefer to show people how to do it.

    Anonymous
    #58927

    Hi 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>

Viewing 10 posts - 1 through 10 (of 12 total)