Forums Forums Search & Filter Pro Category search

Tagged: 

Viewing 10 posts - 41 through 50 (of 51 total)
  • Trevor
    #136775

    I have a sample results.php for you, but as I can’t test it, I don’t know if it will work:

    <?php
    
    /* Blog Style A */
    
    if ( $query->have_posts() ) {
    	?>
    	
    	Found <?php echo $query->found_posts; ?> Results<br />
    	Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
    	
    	<?php
    	while ($query->have_posts()) {
    		$query->the_post();
    
            $cb_post_id = $post->ID;
    ?>
            <article id="post-<?php the_ID(); ?>" <?php post_class('cb-blog-style-a cb-module-e cb-separated clearfix'); ?>>
            
                <div class="cb-mask cb-img-fw" <?php cb_img_bg_color( $cb_post_id ); ?>>
                    <?php cb_thumbnail( '260', '170' ); ?>
                    <?php cb_review_ext_box( $cb_post_id ); ?>
                </div>
    
                <div class="cb-meta clearfix">
    
                    <h2 class="cb-post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    
                    <?php cb_byline( $cb_post_id ); ?>
    
                    <div class="cb-excerpt"><?php echo cb_clean_excerpt( 160 ); ?></div>
                    
                    <?php cb_post_meta( $cb_post_id ); ?>
    
                </div>
    
            </article>
    
            <?php
    
        }
        cb_page_navi( $cb_qry );
    }
    
    wp_reset_postdata();
    
    ?>
    Anonymous
    #136948

    Great! I’ll try to test it and let you know 🙂 Thank you

    Anonymous
    #137714
    This reply has been marked as private.
    Anonymous
    #137716
    This reply has been marked as private.
    Trevor
    #137718

    If I look at a typical page, our form javascript etc is not loading. How have you incorporated the results.php I gave you to the site? Is the form setup as a Shortcode Display Results method, as described here:

    https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/

    Anonymous
    #137720

    Yes, right now I have the basic version of plugin running, not the pro. But yes I created a folder in the theme and displayed the results via shortcode on a test page.

    Trevor
    #137798

    Bear in mind I am working a bit blind here?

    This should remove the bits you din’t want, and enable our infinite scroll:

    <?php
    
    /* Blog Style A */
    
    if ( $query->have_posts() ) {
    	?>
    	
    <div class='search-filter-results-list'>
    	
    	<?php
    	while ($query->have_posts()) {
    		$query->the_post();
    
            $cb_post_id = $post->ID;
    ?>
    	<div class='search-filter-result-item'>
            <article id="post-<?php the_ID(); ?>" <?php post_class('cb-blog-style-a cb-module-e cb-separated clearfix'); ?>>
            
                <div class="cb-mask cb-img-fw" <?php cb_img_bg_color( $cb_post_id ); ?>>
                    <?php cb_thumbnail( '260', '170' ); ?>
                    <?php cb_review_ext_box( $cb_post_id ); ?>
                </div>
    
                <div class="cb-meta clearfix">
    
                    <h2 class="cb-post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    
                    <?php cb_byline( $cb_post_id ); ?>
    
                    <div class="cb-excerpt"><?php echo cb_clean_excerpt( 160 ); ?></div>
                    
                    <?php cb_post_meta( $cb_post_id ); ?>
    
                </div>
    
            </article>
    	</div>
            <?php
    
        } ?>
    </div>
    <?php
    //    cb_page_navi( $cb_qry );
    }
    else
    {
    	?>
    	<div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end'>
    		<span>End of Results</span>
    	</div>
    	<?php
    }
    //wp_reset_postdata();
    
    ?>

    A couple of lines are disabled because I think that they are not needed.

    Anonymous
    #137861

    Infinite scroll works good, and the top doesn’t show the number of results as requested. The only thing that didn’t work was removing the line at bottom of pics (cb-mask) but I changed its color to transparent with css, and adjusted all the other visual things so it looks exactly as the other version. Should the cb-mask be removed from the code as it doesn’t work though? Apart from that all good! Thank you

    Trevor
    #137889

    I think you can take it from here, make whatever changes you want and test. If it works, then that is great. It will not break anything.

    Anonymous
    #137903

    Thank you very much for your help 🙂 I appreciate it!

Viewing 10 posts - 41 through 50 (of 51 total)