Forums › Forums › Search & Filter Pro › customizing search result style
Tagged: search result template
- This topic has 15 replies, 2 voices, and was last updated 8 years, 3 months ago by Trevor.
-
Anonymous(Private) August 23, 2016 at 10:26 am #55332
Hello. I am using soledad theme. I am using shortcode method to display the result. My theme has a search.php for search results template. The results for me has almost the most basic style. I want to select other layouts from the theme for displaying them. Can you help me edit this code to achieve that goal? I paste the codes here:
<?php /** * The template for displaying search results pages. * * @package WordPress * @since 1.0 */ get_header(); /* Sidebar position */ $sidebar_position = 'right-sidebar'; if( get_theme_mod( "penci_left_sidebar_archive" ) ) { $sidebar_position = 'left-sidebar'; } /* Search layout */ $layout_this = get_theme_mod( 'penci_archive_layout' ); if ( ! isset( $layout_this ) || empty( $layout_this ) ): $layout_this = 'standard'; endif; $class_layout = ''; if( $layout_this == 'classic' ): $class_layout = ' classic-layout'; endif; ?> <?php if( ! get_theme_mod( 'penci_disable_breadcrumb' ) ): ?> <div class="container penci-breadcrumb"> <span><a class="crumb" href="<?php echo esc_url( home_url('/') ); ?>"><?php esc_html_e( 'Home', 'soledad' ); ?></a></span><i class="fa fa-angle-right"></i> <span><?php esc_html_e( 'Search', 'soledad' ); ?></span> </div> <?php endif; ?> <div class="container<?php echo esc_attr( $class_layout ); if ( get_theme_mod( 'penci_sidebar_archive' ) ) : ?> penci_sidebar <?php echo esc_attr( $sidebar_position ); ?><?php endif; ?>"> <div id="main" class="penci-layout-<?php echo esc_attr( $layout_this ); ?><?php if ( get_theme_mod( 'penci_sidebar_sticky' ) ): ?> penci-main-sticky-sidebar<?php endif; ?>"> <div class="theiaStickySidebar"> <div class="archive-box"> <div class="title-bar"> <span><?php esc_html_e( 'Search results for', 'soledad' ); ?></span> <h1><?php printf( esc_html__( '"%s"', 'soledad' ), get_search_query() ); ?></h1> </div> </div> <?php if ( have_posts() ) : ?> <?php if( in_array( $layout_this, array( 'mixed', 'mixed-2', 'overlay-grid', 'overlay-list', 'photography', 'grid', 'grid-2', 'list', 'boxed-1', 'boxed-2', 'boxed-3', 'standard-grid', 'standard-grid-2', 'standard-list', 'standard-boxed-1', 'classic-grid', 'classic-grid-2', 'classic-list', 'classic-boxed-1', 'magazine-1', 'magazine-2' ) ) ) : ?><ul class="penci-grid"><?php endif; ?> <?php if( in_array( $layout_this, array( 'masonry', 'masonry-2' ) ) ) : ?><div class="penci-wrap-masonry"><div class="masonry penci-masonry"><?php endif; ?> <?php /* The loop */ while ( have_posts() ) : the_post(); include( locate_template( 'content-' . $layout_this . '.php' ) ); endwhile; ?> <?php if( in_array( $layout_this, array( 'masonry', 'masonry-2' ) ) ) : ?></div></div><?php endif; ?> <?php if( in_array( $layout_this, array( 'mixed', 'mixed-2', 'overlay-grid', 'overlay-list', 'photography', 'grid', 'grid-2', 'list', 'boxed-1', 'boxed-2', 'boxed-3', 'standard-grid', 'standard-grid-2', 'standard-list', 'standard-boxed-1', 'classic-grid', 'classic-grid-2', 'classic-list', 'classic-boxed-1', 'magazine-1', 'magazine-2' ) ) ) : ?></ul><?php endif; ?> <?php penci_soledad_pagination(); ?> <?php else : ?> <div class="nothing"> <span><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'soledad' ); ?></span> </div> <?php endif; wp_reset_postdata(); ?> </div> </div> <?php if ( get_theme_mod( 'penci_sidebar_archive' ) ) : ?> <?php get_sidebar(); ?> <?php endif; ?> <?php get_footer(); ?>
Anonymous(Private) August 23, 2016 at 2:19 pm #55359I guess this is what you are asking for : http://dev.behroo.com/searchtest/
Anonymous(Private) August 23, 2016 at 2:27 pm #55366sorry I missed my desirable version: http://dev.behroo.com/?s=%D8%B6%D8%AF+%D8%A2%D9%81%D8%AA%D8%A7%D8%A8
Trevor(Private) August 24, 2016 at 11:25 am #55483Hi Majid. Are you able to do video conference on Skype, in English? Also (not related) I think your site uses W3Totalcache. I am not sure this is a good plugin any more. Read this:
https://wptavern.com/frederick-townes-confirms-w3-total-cache-is-not-abandoned
-
AuthorPosts