Search Results for 'results.php'

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

Viewing 10 results – 581 through 590 (of 1,344 total)
  • Author
    Search Results
  • #178171

    Trevor
    Participant

    Hi, this is the new custom results.php file. I cannot access this on your site (it seems to be locked), but this is the content I think you need (I therefore cannot test it):

    <?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 />
    	Page <?php echo $query->query['paged']; ?> of <?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>
    	<div class="ptb_loops_wrapper clearfix ptb_grid3">
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
    		<article id="post-<?php the_ID();?>" class="ptb_post clearfix post-32080 padi_courses type-padi_courses status-publish has-post-thumbnail hentry ">
                <div class="ptb_items_wrapper entry-content" itemscope="" itemtype="https://schema.org/Article">
                    <div class="ptb_col ptb_col1-1 ptb_col_first">
                        <div class="ptb_module ptb_title">
                            <h2 class="ptb_post_title ptb_entry_title" itemprop="name">
                                <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
                            </h2>
                        </div>
                        <div class="ptb_module ptb_thumbnail">
                            <figure class="ptb_post_image clearfix">
                                <a href="<?php the_permalink(); ?>">
                                    <?php
    				                    if ( has_post_thumbnail() ) the_post_thumbnail("small");
                                    ?>
                                </a>
                            </figure>
                        </div>
                    </div>
                </div>
    		</article>
    		
    		<?php
    	}
    	?>
        </div>
    	Page <?php echo $query->query['paged']; ?> of <?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";
    }
    ?>
    #177901

    In reply to: Full Posts


    Anonymous
    Inactive

    perfect thanks, using shortcodes so yea will need to edit. SO bascially just duplicate the results.php in theme and that will override?

    #177884

    In reply to: Full Posts


    Trevor
    Participant

    What Display Results method are you using? Most use your theme’s template files (so you might need to edit those, but the Shortcode Display Results Method uses our results.php template, so that can be edited, see here for the customisation guide:

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

    Edit your theme copy of the results.php file and replace the_excerpt with the_content

    #177711

    Anonymous
    Inactive

    Using the shortcode method, I have tried overriding the results.php by putting a new results.php in fellow_one/search-filter-pro/ and fellow_one/search-filter-pro/templates and I have not been able get any changes to show up on the page.
    File Location Screenshot: http://prntscr.com/ji9mu8

    I made recommended code changes in that results.php file:
    Screenshot: http://prntscr.com/ji9l11

    And there’s still no change to the page:
    Video: http://recordit.co/HLKmFG5lhJ

    #177706

    Trevor
    Participant

    With our Shortcode method, in the documentation link I gave you, is the guide to customising.

    Once you have a copy of the results.php file in a search-filter sub-folder of your theme, you can edit that file, like this (leave the PHP comments at the top outside and before this code):

    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 {
      // the results.php PHP code here
    }

    Trevor
    Participant

    There almost certainly will be, yes. What you could do for me to enable me to explore that option is:

    1. Create a child theme of your theme. It can be really easy to do if you use this plugin and follow the default settings (making sure to select the ‘make active’ option):

    https://wordpress.org/plugins/orbisius-child-theme-creator/

    You can remove the plugin when done.

    2. Use ftp to copy the search.php template file from your main theme into the child theme folder, and rename it to search-results.php
    3. Set the search to use that template.


    Anonymous
    Inactive

    Hi,
    this is my second purchase and implementation of this great script for a client, and i have to say we all love it. I have hopefully an easy one here for you.
    i have a search setup here:http://dev.tampamaid.com.php56-3.dfw3-2.websitetestlink.com/products/
    notice how i tapped into the chosen script to style the menus. cool right?
    well the only thing i cant figure out is why that styling drops off after a search is processed.
    I’m running the filters and results as shortcodes on the products page and using a customized results.php file located in my child theme for display.
    Anything that you might have seen before that could point me in the right direction to solve this little bug would be greatly appreciated. I can supply access to the site and or source code.
    thanks

    #176851

    Anonymous
    Inactive

    Hi, yes your right editing the results.php worked better, placed in child theme.

    Thanks,

    #176841

    Trevor
    Participant

    Are you using our shortcode display results method? If so, edit the results.php file to use code 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).

    Make sure you are working on a copy of the results.php file in a search-filter sub-folder of your theme/child theme folder, and not the original in our plugin template folder.

    #176811

    Trevor
    Participant

    The file either has to be named results.php OR …

    Let us assume that the form ID is 1234 (from the shortcode you see in the form, or indeed the post ID of the form), then if you named the file 1234.php, it would use that. The results shortcode you use does not change.

Viewing 10 results – 581 through 590 (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.