Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro customizing search result style

Viewing 10 posts - 1 through 10 (of 16 total)
  • Majid Karimi
    #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(); ?>
    Trevor Moderator
    #55335

    It is much easier for me if you show me a live sample page that uses the template as you want, and the live search results page as it is now.

    Majid Karimi
    #55359

    I guess this is what you are asking for : http://dev.behroo.com/searchtest/

    Trevor Moderator
    #55364

    Yes, but also a page showing how it should look?

    Majid Karimi
    #55366
    Majid Karimi
    #55369

    I use shortcode because I want the user to stay in a single page with the search form in its sidebar. I couldn’t achieve that with other displaying methods.

    Majid Karimi
    #55370

    In the second version (should-be version), forget about sidebar and other elements, I need the body part containing search results to be like that. In sidebar, I want the search form to be fixed (which is fine in the first i.e. as-is version)

    Trevor Moderator
    #55380

    Hi Majid

    I will do this in the morning. What calculates the pie charts? I see nothing in the php template code for that.

    Majid Karimi
    #55457

    Pie chart is calculated by a plugin bundled by theme called “penci review”. It adds the pie chart to the featured image. If you look at the home page you will see featured images with different thumbnail sizes have the pie chart.

    Trevor Moderator
    #55483

    Hi 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

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

The forum ‘Search & Filter Pro’ is closed to new topics and replies.