Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 1,061 through 1,070 (of 1,224 total)
  • Author
    Search Results
  • #34814

    Anonymous
    Inactive

    Hi.
    I use a search form with results displayed as shortcode. I customized results.php file, everything is working fine except my a href=”#” links 🙁
    These links were used in my template to display further information about each result, but I can’t get them to work now.
    I thought it might be Ajax conflict, so I desactivated it, but it still doesn’t work.
    Thanks for your help
    Séline


    Anonymous
    Inactive

    Ah so Ive just seen its possible

    Yep, it’s actually pretty easy to do also……

    Create a folder IN your WP Theme folder and name it /search-filter

    Then start with any template (e.g. results.php) and name it for the search filter you’ve created. For example, in your search and filter shortcode, it gives you a form ID, such as “102”, so name your template page “102.php” and put it in that new folder and upload it.

    S&P will use your new template file to display your results.


    Anonymous
    Inactive

    Hello,

    Your plugin is good, but really difficult to configure. At least for me. I tough that I am finally done with configuration, after all day work with it, when I saw one more problem.

    This is my current project: http://www.orbelus.bg/en/orbelus-wines/
    And the problem is that when you choose one search option, criteria (vintage for example) and then another (let say variety), the result page is showing “no results found”. But if you refresh the page, the results will be shown correctly.

    Search pages are not cached, I am using latest WP (4.4.1) and S&F(2.1.0), results are displayed with shortcode in a page, I am using customized results.php which is linked to the this page. If you need some more info, I will be glad to provide it.

    Thanks in advance.
    Mladen

    #33603

    Anonymous
    Inactive

    But i think you need only a image for results, so sorry, i need a image for filters.

    If you need a image for results, simply open a: templates/results.php and add a <?php the_post_thumbnail(‘full’); ?> for images, you can use thumbnails, medium as you want or a any custom size for your theme.

    #33270

    Ross
    Keymaster

    Hey Celia

    The only way to customize S&F is to follow the instructions here if using the shortcode display method:

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

    S&F does not automatically have support for all other plugins out there I’m afraid, and as I’ve never used that plugin its going to be hard for me to suggest what you need to do.

    Just to confirm, is it this one https://themify.me/demo/themes/post-type-builder/ ?

    There are two possible ways I can see of getting this to work:

    1) Take a look at the code generated by Post Type Builder, and copy & paste that over in to a custom results.php (as described in the link I sent). This would require some coding knowledge, but not too advanced, and basically you would need to copy over the html structure into the template.

    2) If (and I really have no idea, but this would be ideal) your “post type builder” plugin saves templates as php files, then you might be able to get this to work directly with S&F by setting your display method to “archive” and entering the filename of this template.

    Thanks

    #33098

    Ross
    Keymaster

    This is how to customise the results:

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

    I don’t know how you are creating your loop in the results but it is not correct.

    It is not using the query created – you should use the example results.php to figure out the correct usage.

    Ie, you should use $query->have_posts() instead of just have_posts() (I’m just guessing here.

    How are you creating your layout?

    Just to let you know support is now closed until the 4th due to new year and as usual we are closed on the weekends.

    Thanks

    #32694

    Ross
    Keymaster

    Hey Peer

    Yup the pagination is the issue.

    In some very old version of S&F we used a custom pagination function, which were dropped after not being in use for very long in favour of WordPress standards.

    Check the results.php template included in the Search & Filter plugin folder to see the new usage 🙂

    You can also use the wp-pagenavi plugin (https://en-gb.wordpress.org/plugins/wp-pagenavi/)

    Thanks!


    Anonymous
    Inactive

    I’ve a results.php with

    <?php
    /**
     * Search & Filter Pro 
     *
     * Sample Results Template
     * 
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      http://www.designsandcode.com/
     * @copyright 2014 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
     * 
     * 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
     *
     */
    
    /* ROSS DEV CODE START */
    //var_dump($query->posts);
    
    /* $i = 1;
    foreach($query->posts as $tpost)
    {
    	echo $i." | ".$tpost->post_title;
    	echo "<br />";
    	$i++;
    }
    echo "<hr />";
    $i = 1;
    while ($query->have_posts())
    {
    	$query->the_post();
    	echo $i." | ";
    	the_title();
    	echo "<br />";
    	$i++;
    }
    /* ROSS DEV CODE END */
    		
    
    if ( $query->have_posts() )
    {
    
    	?>
    	
    	<div class="row">
    	<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
    	<div class="filter-results" >
    	<div class="filter-results-page"><?php echo $query->found_posts; ?> Ergebnisse  Seite <?php echo $query->query['paged']; ?> von <?php echo $query->max_num_pages; ?></div>
    	
    	<div class="filter-results-pagination">
    	<?php sf_pagination_prev_next($query->query['paged'], $query->max_num_pages); ?>
    	<?php sf_pagination_numbers($query->query['paged'], $query->max_num_pages, " "); ?>
    
    	</div>
    	</div>
    	</div>
        </div>
        <div class="row">
    
        <?php
        
       
    
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		$post_type = get_post_type( get_the_ID() );
    	
    		?>
    
    	
    		
    		
    			
    			
    			
    				<?php 
    
    				switch ($post_type) {
    				    
    				    case 'wein': 
                            
                            echo '<div class="col-xs-12 col-sm-4 col-md-3 col-lg-3">';
    						echo '<div class="item-'.$post_type.'">'; 
    
    				        $wine_id = get_the_ID();
    				    	$term_list = wp_get_post_terms($wine_id, 'winzer', array("fields" => "names"));
    						$title = get_the_title();
    				        $permalink = get_permalink();
    				        $stock = get_field('wine-stock');
    				        $stock_text = get_field('wine-stock-text');
    				     
    
    				        if (empty($stock_text)) {
    
    				        	$stock_text = "Ausverkauft!";
    				        }
    
    				       if (!empty($stock)) {
    				         echo '<div class="wine-teaser"> <span></span><p>'.$stock_text.'</p></div>';
    				       }
    
    				        $name =  get_field('wine-name');
    				        $img_url =  get_field('wine-detail-image');
    
    				        if (empty($img_url)) {
    				        $img_url = '/wordpress/wp-content/uploads/wine_empty.png';
    				       }
    				        $year =  get_field('wine-detail-year');
    				        $sf =  get_field('wine-detail-soul-faktor');
    				        $size =  get_field('wine-detail-size');
    				        echo '<div class="item-overlay"><div class="overlay-content">'.$sf.'<br>Flasche'.$size.'</div></div>';
    				        echo '<a href="'.$permalink.'" title="'.$title.'">';
    				        //echo '<img src="'.aq_resize( $img_url, '300').'" alt="'.$title.'"></a></div>';
    				        echo '<img src="'.aq_resize( $img_url, '300').'" alt="'.$title.'"></a></div>';
    				        echo '<div class="wine-description"><h2><a href="'.$permalink.'" title="'.$title.'">'.$year.' '.$name.'</a></h2>';
    				        echo '<h3>'.$term_list[0].'</h3></div>';
    				        break;
    				    case 'winzer':
    				    	$grower_id = get_the_ID();
    				    	$term_list_country = wp_get_post_terms($grower_id, 'land', array("fields" => "names"));
    				    	$term_list_region = wp_get_post_terms($grower_id, 'anbaugebiet', array("fields" => "names"));
    				        $img_url =  get_field('winegrower-preview-image');
    				        $logo_url =  get_field('winegrower-logo');
    				        $title = get_the_title();
    				        $permalink = get_permalink();
    				 
    				        $exclusive = get_field('winegrower-exclusive');
    				        if ($exclusive == 1) {
    				        	$addexclusive = ' - Exklusiv bei Wein am Limit';
    				        } else {
    				        	$addexclusive = '';
    				        }
    				        echo '<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">';
    						echo '<div class="item-'.$post_type.'">'; 
    						
    						if (!empty($img_url)) {
    								if (!empty($logo_url)){
    								echo '<div class="logo-overlay"><img src="'.aq_resize( $logo_url, '100').'"></div>';}
    								echo '<a href="'.$permalink.'" title="'.$title.'">';
    						        //echo '<img src="'.aq_resize( $img_url, '600', '290' , true).'" alt="'.$title.'"></a></div>';
    						        echo '<img src="'.aq_resize( $img_url, '600', '290' , true).'" alt="'.$title.'"></a>';
    				        }
    				        echo '</div>';
    
    				        echo '<div class="grower-description"><h2><a href="'.$permalink.'" title="'.$title.'">'.$title.$addexclusive.'</a></h2>';
    				        echo '<h3>'.$term_list_region[0].', '.$term_list_country[0].'</h3></div>';
    				       
    				        break;
    				    
    				}
    
    		
    
    				
    
    				 ?>
    				
    			
    	
    			</div>
    
    		
    		<?php
    	}
    	?>
    
    </div>
    	<div class="row">
    	<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
    	<div class="filter-results" >
    	<div class="filter-results-page"><?php echo $query->found_posts; ?> Ergebnisse  Seite <?php echo $query->query['paged']; ?> von <?php echo $query->max_num_pages; ?></div>
    	
    	<div class="filter-results-pagination">
    	<?php sf_pagination_prev_next($query->query['paged'], $query->max_num_pages); ?>
    	<?php sf_pagination_numbers($query->query['paged'], $query->max_num_pages, " "); ?>
    
    	</div>
    	</div>
    	</div>
        </div>
    	
    	<?php
    }
    else
    {  
    	echo '<div class="filter-results" style="height:38px;"><div class="filter-results-page"><div class="filter-results-pagination"></div></div></div>';
    	echo '<div style="width:100%; text-align:center;min-height:400px;padding-top:100px;">Keine Produkte gefunden.</div>';
    }
    ?>

    which is workin no more after update to S&F 2.0.3 (from 1.4.2) – I’ve rebuild all caches, the site stay just empty. Any ideas on this?

    Best.


    Anonymous
    Inactive

    Hello

    Environment: WP 4.4 with a custom child-theme

    I am using a child-theme with three different search forms on different pages and would like to customize the results for each search form. Therefore I have created a folder “search-filter” in my child-theme folder as described here:
    http://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/

    If I put a results.php into that folder, my customizations for the search result display are correctly picked up from results.php

    But if I rename it to 251.php (which is the ID of one of my search forms) and use it together with [searchandfilter id=”251″ show=”results”], the customizations are not picked up anymore.

    Is this a known bug? I read the documentation and am quite sure I am doing it right…

    Thanks
    Roger

    #32367

    Anonymous
    Inactive

    I would like to spend my results over the results.php! then you want to display the GoPricing Tabels in the output. is this possible?

Viewing 10 results - 1,061 through 1,070 (of 1,224 total)