Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 91 through 100 (of 1,224 total)
  • Author
    Search Results
  • #259625

    In reply to: URL Change


    Trevor
    Participant

    If you browse through the plugins files, there is a templates folder. Look at the code in the results.php file. The code in that file is based on the basic code structure suggested in the WordPress Codex.

    You might also look at the theme files you have and see if there is one named archive.php

    If you want only a single page for results, you could use our Shortcode method and modify the code in the results.php template file. Many users do this, there is a guide to customising in our documentation on how to start this.

    #259068

    In reply to: Taxonomy


    Trevor
    Participant

    As you are using our shortcode method the display of the results comes from our results.php file. You would need to customise it as described (in basic form) here:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results

    You need to remove the line:

    <p><small><?php the_date(); ?></small></p>

    #258483

    Trevor
    Participant

    I apologise for the delay, I ran out of time yesterday.

    If you haven’t already done so, can you follow this guide:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/

    In particular, follow the instructions in the Customising section.

    That will give you a results.php file you can edit, in a sub-folder named search-filter in your theme folder.

    To make the pagination look nicer, install the free WP-PageNavi plugin and delete these lines in the results.php template file:

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

    To show only a link to the pdf itself, replace these lines:

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

    With this:

    <h2><a href="<?php echo esc_url(wp_get_attachment_url(get_the_ID () , false )); ?>"><?php the_title(); ?></a></h2>

    #257846

    Trevor
    Participant

    If you are using the Shortcode display results method …

    If you haven’t already done so, can you follow this guide:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/

    In particular, follow the instructions in the Customising section.

    However, I think you have missed this crucial step, based on your post:

    Rather than copy the results.php file to your theme sub-folder, copy the results-infinite-scroll.php file, and then rename it to results.php

    The code for this file is different, to account for how the Infinite Scroll works.

    That will give you a results.php file you can edit, in a sub-folder named search-filter in your theme folder.

    So, look for this code in the results.php template file:

    Found <?php echo $query->found_posts; ?> Results<br />

    … and delete that line.

    Please note that in the UK today is a public holiday, so further replies may be delayed.

    #256885

    In reply to: No search results


    Trevor
    Participant

    I apologise for the delay Jens, I ran out of time yesterday.

    If you haven’t already done so, can you follow this guide:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/

    In particular, follow the instructions in the Customising section.

    That will give you a results.php file you can edit, in a sub-folder named search-filter in your theme folder.

    Would you want to show that after you search? My guess is yes. So, look for this code in the results.php template file:

    Found <?php echo $query->found_posts; ?> Results<br />
    Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />

    And change that to (I think this will work):

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(30408)->current_query();
    if (!((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()==""))) {
    	Found <?php echo $query->found_posts; ?> Results<br />
    	Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
    }

    You can change anything else you want also. For example, to make the pagination look nicer, install the free WP-PageNavi plugin and delete these lines:

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

    Trevor
    Participant

    It isn’t, I am sorry. Two possibilities I can think of. One is to change the template so that the change is inside an if condition, and you check to see what page/post you are on? That would be my first choice. The other option is to make a duplicate form and use that form instead on the page, and number the results.php (as suggested in those same instructions you mentioned).


    Anonymous
    Inactive

    Good afternoon,

    I wanted to alter the output of results.php for a site I am building. Your instructions suggest creating an alternate results.php template in my child theme, which would normally be fairly straightforward. However, the child theme in question here is running in a total of 50 different places and I only want to make this modification on one of those properties.

    Is it possible to locate the new results.php file in a different location (like a separate plugin) and have it still be available to your product?

    Thanks!

    #256692

    In reply to: No pagination


    Trevor
    Participant

    Are you using the Shortcode Display Results Method? If so, start with this guide (if you have not already):

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results

    Having gotten the copy into your child theme sub folder, install the free WP-PageNavi plugin:

    https://wordpress.org/plugins/wp-pagenavi/

    If that gives you what you want, you would then need to edit that results.php file to remove the parts of the HTML/PHP that you no longer need.

    #256688

    In reply to: No pagination


    Trevor
    Participant

    Are you using the Shortcode Display Results Method? If so, start with this guide (if you have not already):

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results

    Having gotten the copy into your child theme sub folder, install the free WP-PageNavi plugin:

    https://wordpress.org/plugins/wp-pagenavi/

    If that gives you what you want, you would then need to edit that results.php file to remove the parts of the HTML/PHP that you no longer need.

    #256684

    Trevor
    Participant

    If you haven’t already done so, can you follow this guide:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/

    In particular, follow the instructions in the Customising section.

    That will give you a results.php file you can edit, in a sub-folder named search-filter in your theme folder.

    Then, see the guidance in this post:

    https://support.searchandfilter.com/forums/topic/ajax-not-working-submit-button-also-gone/page/2/#post-134962

Viewing 10 results - 91 through 100 (of 1,224 total)