Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 581 through 590 (of 1,224 total)
  • Author
    Search Results

  • Anonymous
    Inactive

    I’ve been using S&F pro 1.4.3 for a long time. It contains some customizations I made at the time, with your help, to search-filter.php and templates/results.php.

    After the upgrade, the search-filter.php file no longer exists, and I cannot find where the code was that I customized in the 1.4.3 version.
    Can you tell me where this code is now:
    $taxonomychildren = get_categories($args);

    if($types[$i]==”select”)
    {
    $returnvar .= $this->generate_wp_dropdown($args, $taxonomy, $this->tagid, $taxonomydata->labels);
    }
    else if($types[$i]==”checkbox”)
    {
    $args[‘title_li’] = ”;
    $args[‘defaults’] = “”;
    $args[‘exclude’] = “1,3”;
    if(isset($this->defaults[$args[‘name’]]))
    {
    $args[‘defaults’] = $this->defaults[$args[‘name’]];
    }
    //$args[‘show_option_all’] = 0;

    $returnvar .= $this->generate_wp_checkbox($args, $taxonomy, $this->tagid, $taxonomydata->labels);
    }
    It used to be in search-filter.php on line 1376.
    Regards,
    Boris Hoekmeijer

    #155392

    Trevor
    Participant

    If you want to use the infinite scroll template, you must rename it to results.php and put it in the child theme folder. Did you do that?

    #153312

    Trevor
    Participant

    If I am right in thinking this, at the moment that results page uses a results.php file as its template? Yes?

    If so … then I need you to make an alternative advanced search page, without the searchform (but with a text box to say ‘Search form here’ and then the main contents to be a grid or whatever of your posts (or whatever you are searching on the other form) made using the page builder of that theme.

    #153258

    In reply to: Infinite Scroll issues


    Anonymous
    Inactive

    Hi, thanks for coming back to me.

    For one of the custom results.php files I have used the infinite scroll version, my code looks like this (below).

    I have also used a form without a custom results.php file, so it should have used the standard results.php file stored within the plugin.

    <?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
     *
     */
    
    if ( $query->have_posts() )
    {
    	?>
    
    	<div class="filter-grid">
    	
    		<div class='search-filter-results-list'>
    		<?php
    			while ($query->have_posts())
    			{
    				$query->the_post();
    				
    				$thumb_url = get_post_meta( get_the_ID(), 'news_thumbnail', true );
    				$link = get_post_meta( get_the_ID(), 'news_link', true );
    
    				if ( empty($link) ) {
    					$link = get_the_permalink();
    				}
    				?>
    
    				<div class="x-column x-sm x-1-3 item">
    				  <div class="category"><?php echo get_the_term_list(get_the_ID(), 'news', '', ', ', ''); ?></div>
    				  <a href="<?php echo $link; ?>">
    				    <div class="image">
    				      <img src="<?php echo $thumb_url; ?>" width="100%" />
    				    </div>
    				    <div class="content">
    				      <h3><?php the_title(); ?></h3>
    				      <p><?php echo get_the_date( 'd.m.y' ); ?></p>
    				    </div>
    				  </a>
    				</div> <!-- .item -->
    				
    				<?php
    			}
    		?>
    		</div> <!-- .search-filter-results-list -->
    
    	</div> <!-- #filter-grid -->
    <?php
    }
    else
    {
    	?>
    	<div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end'>
    		<span>End of Results</span>
    	</div>
    	<?php
    }
    ?>
    #153254

    In reply to: Infinite Scroll issues


    Trevor
    Participant

    You will need to follow the instructions for making a custom results.php file here:

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

    However, you need to change the contents of the standard results.php file to the content of the infinite scroll version, which look like this:

    <?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
     *
     */
    
    if ( $query->have_posts() )
    {
    	?>
    	
    	Found <?php echo $query->found_posts; ?> Results<br />
    	<div class='search-filter-results-list'>
    	<?php
    		while ($query->have_posts())
    		{
    			$query->the_post();
    			
    			?>
    			<div class='search-filter-result-item'>
    				<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    				
    				<p><br /><?php the_excerpt(); ?></p>
    				<?php 
    					if ( has_post_thumbnail() ) {
    						echo '<p>';
    						the_post_thumbnail("small");
    						echo '</p>';
    					}
    				?>
    				<p><?php the_category(); ?></p>
    				<p><?php the_tags(); ?></p>
    				<p><small><?php the_date(); ?></small></p>
    				
    				<hr />
    			</div>
    			
    			<?php
    		}
    	?>
    	</div>
    <?php
    }
    else
    {
    	?>
    	<div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end'>
    		<span>End of Results</span>
    	</div>
    	<?php
    }
    ?>
    #152620

    Trevor
    Participant

    It should work. I do it fine, so I do not see what the problem can be. With the shortcode method, especially with the standard results.php (not edited), there is very little to go wrong.

    #152310

    Anonymous
    Inactive

    Yes the file is named results.php. The custom results show fine. Its the infinite scroll that no longer is working. Even when it was working it would be random. Like not work when I was logged into wordpress but it would work when I was viewing the site while logged off. Also sometimes I had to interact with the dropdown filters before infinite scroll would start to work. Now its not working at all.

    #152308

    Trevor
    Participant

    That is the contents of the file in the search-filter sub-folder of your child theme? What name does that file have? It should be results.php

    #152154

    In reply to: avada theme


    Anonymous
    Inactive

    it not avada theme code its wp theme code. i dont use masonry.
    here is the results.php
    <?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
    *
    */

    if ( $query->have_posts() )
    {
    ?>

    <?php echo $query->found_posts; ?> Ergebnisse gefunden<br />
    Seite <?php echo $query->query[‘paged’]; ?> von <?php echo $query->max_num_pages; ?><br />

    <div class=”pagination”>

    <div class=”nav-previous”><?php next_posts_link( ‘Older posts’, $query->max_num_pages ); ?></div>
    <div class=”nav-next”><?php previous_posts_link( ‘Newer posts’ ); ?></div>
    <?php
    /* example code for using the wp_pagenavi plugin */
    if (function_exists(‘wp_pagenavi’))
    {
    echo “<br />”;
    wp_pagenavi( array( ‘query’ => $query ) );
    }
    ?>
    </div>

    <?php
    while ($query->have_posts())
    {
    $query->the_post();

    ?>
    <div>
    <h2>“><?php the_title(); ?></h2>
    <?php if( have_rows(‘bilder’) ): ?>
    <div class=”acf-gallery col-sm-12 col-xs-12 col-md-3″>
    <div class=”fusion-gallery fusion-gallery-container fusion-grid-1 fusion-columns-total-10 fusion-gallery-layout-grid” style=”margin: -5px; position: relative; height: 1889.1px;”>

    <?php $tmp=0;
    while( have_rows(‘bilder’) ): the_row();
    $image = get_sub_field(‘url’);
    if ($tmp==0) : ?>
    <div style=”padding: 5px; display: block; position: absolute; left: 0px; top: 0px;” class=”fusion-grid-column fusion-gallery-column fusion-gallery-column-1 hover-type-zoomin”><div class=”fusion-gallery-image”>” class=”fusion-lightbox” data-rel=”iLightbox[d2dfb9cbd4d28f5c119]” data-caption=””>” alt=”” title=”” aria-label=”” class=”img-responsive wp-image-397″></div></div>
    <div class=”clearfix”></div>
    <?php $tmp++; ?>
    <?php endif; ?>

    <?php endwhile; ?>
    </div>
    </div>
    <?php endif; ?>
    <div class=”col-sm-12 col-xs-12 col-md-9″><?php the_content(); ?></div>

    <p><?php the_category(); ?></p>
    <p><?php the_tags(); ?></p>
    <div class=”clearfix”></div>

    </div>
    <div class=”clearfix”></div>

    <hr />
    <?php
    }
    ?>
    Seite <?php echo $query->query[‘paged’]; ?> von <?php echo $query->max_num_pages; ?><br />

    <div class=”pagination”>

    <div class=”nav-previous”><?php next_posts_link( ‘Older posts’, $query->max_num_pages ); ?></div>
    <div class=”nav-next”><?php previous_posts_link( ‘Newer posts’ ); ?></div>
    <?php
    /* example code for using the wp_pagenavi plugin */
    if (function_exists(‘wp_pagenavi’))
    {
    echo “<br />”;
    wp_pagenavi( array( ‘query’ => $query ) );
    }
    ?>
    </div>
    <?php
    }
    else
    {
    echo “No Results Found”;
    }
    ?>

    #152135

    In reply to: avada theme


    Trevor
    Participant

    Hi

    If I switch off Ajax, then the results load correctly. I can see that you have customised the results.php file.

    The problem is that you are loading the posts using Avada’s theme code, and this uses Masonry/Isotope to reload the grid. The Avada code does not use the normal Masonry methods/code to do this. Other users of Avada and Search & Filter Pro have asked them for help but they have not provided the necessary code.

    What I need to know is the necessary javascript to recreate the masonry grid when Ajax is used to reload the results.

    Until they can supply that, using Ajax isn’t going to work properly.

Viewing 10 results - 581 through 590 (of 1,224 total)