Forums Forums Search & Filter Pro Slow SF Page With Many Results

Viewing 3 posts - 11 through 13 (of 13 total)
  • Trevor
    #45209
    This reply has been marked as private.
    Anonymous
    #45212

    No problem – speedy recovery.

    I think the problem lies with the code I have customized here for results.php in SFpro. It seems that maybe my conditional for the second part doesn’t take into consideration the arguments of the query. I end up with all the posts in my db generating equivalent modals. :

    <?php
    /**
     * Search & Filter Pro
     *
     * Sample Results Template
     *
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      http://www.designsandcode.com/
     * @copyright 2015 Designs & Code
     *
     * Note: these templates are not full page templates, rather
     * just an encaspulation of the your results loop which should
     * be inserted in to other pages by using a shortcode - think
     * of it as a template part
     *
     * This template is an absolute base example showing you what
     * you can do, for more customisation see the WordPress docs
     * and using template tags -
     *
     * http://codex.wordpress.org/Template_Tags
     *
     */
    
    // $term_list = wp_get_post_terms($post->ID, 'product_features', array("fields" => "all"));
    // foreach($term_list as $term_single) {
    // echo $term_single->slug; //do something here
    // }
    
    if ( $query->have_posts() )
    {
    	?>
    
    	<div class="">
    
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    
    		?>
    
    			<a class="col-md-6 col-lg-4 col-sm-6">
    				<article class="module-container eModal-post-<?php the_ID();?>" href="<?php the_permalink();?>">
    
    				    <h3><?php the_title();?></h3>
    
    				</article>
    			</a>
    
    			<?php
    
    			if( get_field( "demo_module" )) {
    
    			echo do_shortcode( "[modal id='post-". get_the_ID() ."' size='large' title='". get_the_title() ."']".
    
    				 "<div class='col-md-8'>"  . get_the_content() .  "<div class='demo-module'>" . "<a class='cta-button-v4' href='" . get_field( "demo_module" ) . "' target='_blank'>Download Demo Module</a>". "</div>" .  "</div>" . "<div class='col-md-4'>" . do_shortcode("[module_author]") . "</div> <div class='col-md-12'><div class='cta-module'>" . do_shortcode("[cta_module_shortcode]") . "</div></div>" .
    
    				 do_shortcode("[wpdm_package id='". get_the_ID() . "']").  "[/modal]" );
    
    			 } else {
    
    				 echo do_shortcode( "[modal id='post-". get_the_ID() ."' size='large' title='". get_the_title() ."']".
    
    	 				 "<div class='col-md-8'>"  . get_the_content() .   "</div>" . "<div class='col-md-4'>" . do_shortcode("[module_author]") . "</div> <div class='col-md-12'><div class='cta-module'>" . do_shortcode("[cta_module_shortcode]") . "</div></div>" .
    
    	 				 do_shortcode("[wpdm_package id='". get_the_ID() . "']").  "[/modal]" );
    
    			 }
    
    				 ?>
    
    		<?php
    	}
    	?>
    
    	</div>
    
    	<?php
    }
    else
    {
    	echo "No Such Modules";
    }
    ?>
    
    Ross Moderator
    #45432

    Hi Dan

    A really simple test would be to temporarily remove, or rename your template file – so that S&F uses the default template provided in the plugin.

    CAn you do that, and let me know if the results are still loading slow?

    Also, I took a look, but it seems the results load fine – for me, they are pretty snappy with ajax requests – and pingdom now shows 5 seconds for me:

    http://fpt.pingdom.com/#!/ct3r36/http://coachingourselves.com/modules-english/

    Can you also test when you change the pagination settings in S&F to something like “5 results per page”? I have a feeling it oculd be the number of results loading in.

    Thanks

Viewing 3 posts - 11 through 13 (of 13 total)