Search Results for 'results.php'

Forums › Forums › Search › Search Results for 'results.php'

Viewing 10 results – 461 through 470 (of 1,344 total)
  • Author
    Search Results
  • #192214

    In reply to: Search results


    Anonymous
    Inactive

    I repeat my problem again:

    I have filter as shortcode on page /blog/. I use SHORTCODE method to filter/display results on this page.
    I want to change title on BLOG page, not in results.php LOOP. NOT IN LOOP. Only one BLOG page title, which is “Recent posts” and marked <div class="page-blog page-blog-title">Recent posts</div>. It’s not in loop.

    #192200

    In reply to: Search results


    Trevor
    Participant

    When I looked at your site, you had two forms. One was using our shortcode method, and that is what is used on the page (not the template you mention). In your theme (or child theme) folder, you had a sub-folder called search-filter. In that was the results.php template.

    #192194

    In reply to: Search results


    Anonymous
    Inactive

    This is similar to what I need, but not at all.
    I have blog-page.php in my theme, and in line 24 i have:
    <div class="page-blog page-blog-title">Recent posts</div>
    I want chagne this, not in results.php loop.

    I tried to put your code in blog-page.php, but ajax do not working.

    #192106

    In reply to: Search results


    Trevor
    Participant

    Line 42 of your custom results.php looks like this:

    <div class="blog-post__title"><a href="<?php the_permalink();?>"><?php the_title();?></a></div>

    It does not need the <a href="<?php the_permalink();?>"> and closing </a> as it is not a link, and you can replace the <?php the_title();?> with code to show what you want.

    This documentation is a start:

    https://searchandfilter.com/documentation/accessing-search-data/

    But you can use more complex code that the snippets shown.

    #191957

    Anonymous
    Inactive

    Hi,
    I followed this page – https://searchandfilter.com/documentation/search-results/using-a-shortcode/- step by step, and can’t seem to get my results to use the new results.php file. I did notice that it says /search-filter/ and not /search-filter-pro/ and tried both variations but it didn’t work either way.


    Anonymous
    Inactive

    Hi!

    I’m using the display as shortcode option, and have copied the results.php into /child-theme/search-filter/ folder.

    The temple override shows title, etc. But I cannot seem to show custom meta.

    I’m trying to display the product price.

    I have tried quite a few variations of methods – using globals with get_post_meta, get_the_ID, $product/$post->get_id(), etc. Pretty much every variant I could find/know already.

    My last guess is that the $query being referenced, has an issue.

    Please can you help?

    #191491

    Anonymous
    Inactive

    Hello,
    I use your plugin for the homepage of my website:
    You helped me to configure the presentation of this page: https://www.filmspourenfants.net/
    (See topic: https://support.searchandfilter.com/forums/topic/show-results-in-grid/)

    I see a problem, the images that appear in grid (thumbnails) are actually very large and therefore take time to load.

    Example with the film Silent Voice :
    capture

    The image come from the url:
    https://www.filmspourenfants.net/wp-content/uploads/2018/10/silent-voice-a.jpg
    instead of this one:
    https://www.filmspourenfants.net/wp-content/uploads/2018/10/silent-voice-a-183×250.jpg

    which is available on this page as thumbnails:
    https://www.filmspourenfants.net/silent-voice/

    Can you please help me use the urls small thumbnails rather than large images?

    As a reminder, here is the code of my results.php file:

    <?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="gp-blog-wrapper gp-blog-columns-6">
    	 <div class="gp-inner-loop ajax-loop">
    	
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
    		<section class="gp-post-item post-<?php get_the_id();?> post type-post format-standard has-post-thumbnail category-post-formats" itemscope="" itemtype="http://schema.org/Blog">
    			<div class="gp-post-thumbnail gp-loop-featured">
    				<div class="gp-image-above">
    					<a href="<?php the_permalink(); ?>">
    			<?php 
    				if ( has_post_thumbnail() ) {
    					the_post_thumbnail("small", array('class' => 'gp-post-image gp-large-image'));
    					the_post_thumbnail("thumb", array('class' => 'gp-post-image gp-mobile-image'));
    				}
    			?>
    					</a>
    				</div>
    			</div>
    			<div class="gp-loop-content gp-image-above">
    				<h2 class="gp-loop-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    				<div class="gp-loop-cats">
    					<?php echo get_the_term_list( get_the_id(), 'gp_hubs', '', ' ', '' ); ?> 
    
    				</div>
    			</div>
    		</section>
    		<?php
    	}
    	?>
    	</div></div>
    	Page <?php echo $query->query['paged']; ?> sur <?php echo $query->max_num_pages; ?><br />
    	
    	<div class="pagination">
    		
    		<div class="nav-previous"><?php next_posts_link( 'Page suivante', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Page précédente' ); ?></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 "Aucun résultat";
    }
    ?>
    #191370

    Trevor
    Participant

    I cannot yet see anything obviously incorrect.

    If you create a test page and use the default results.php file, does the failure of Ajax also happen.

    Is it possible to test this also with a default theme? Whilst I cannot see any javascript errors, there might be a conflict with the theme and/or another plugin.

    Are you using any lazy load scripts (such as in Jetpack)?

    #191321

    Trevor
    Participant

    As you are using the Shortcode results method, and our results.php template file (infinite scroll version), it would look like this:

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(1024)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
      echo '<div>Nothing to see here folks!</div>'; 
    } else {
      // your template archive code/loop OR results.php code here
    }

    Change 1024 to the ID number of your form (from the form shortcode).

    #191180

    Anonymous
    Inactive

    I would like the results of a term of this taxonomy to always be displayed when selecting a term from my own taxonomy.

    Example:
    Taxonomy: Regions
    Terms: Austria, Vienna, Salzuburg etc.
    Articles with the term “Austria” should always be displayed if one of the other terms is selected.

    For the taxonomy archive page I have added the following to the “functions.php”:

    function my_modify_main_query( $query ) {
    	if ( !is_admin() && $query->is_main_query() ) {
    		
    			$query->set( 'tax_query', array(
    				'relation' => 'OR',
    				array(
    					'taxonomy' => 'region',
    					'field' => 'slug',
    					'terms' => 'Österreich'
    				),
    			) );
    		
    	}
    }
    add_action( 'pre_get_posts', 'my_modify_main_query' );

    Unfortunately this does not affect the result of “Search & Filter”. I use the shortcode method for display and in the file “results.php” the element “$query” is actually addressed as well.

    Any approach on how to get my behavior realized?

Viewing 10 results – 461 through 470 (of 1,344 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.