Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 521 through 530 (of 1,224 total)
  • Author
    Search Results
  • #178940

    In reply to: 0 results showing


    Trevor
    Participant

    If you followed this customising guide:

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

    You will have a copy of the results.php ile in your theme folder (in a sub-folder called search-filter).

    Edit that file and find the image part (usually on line 59) and change the word small to thumb.

    #178373

    In reply to: Issue with date


    Trevor
    Participant

    You are using our Shortcode Display Results method and so will have coded the results.php template. In that, it use the WordPress function the_date(). One effect of this function is that it does not repeat the same date, it shows it only for the first post with that date.

    If instead you use echo get_the_date() that will always output the date.

    #178183

    Anonymous
    Inactive

    I just copied the new version of the code in the results.php

    #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.

    #176851

    Anonymous
    Inactive

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

    Thanks,

Viewing 10 results - 521 through 530 (of 1,224 total)