Search Results for 'results.php'

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

Viewing 10 results – 1,161 through 1,170 (of 1,344 total)
  • Author
    Search Results
  • #38569

    Anonymous
    Inactive

    Hey Ross,

    same results, even when using the standard results.php, having only WooCommerce, ACF and Search and Filter activated, using hard-coded shortcode and using vanilla wordpress/storefront themes… It usually works fine until cache rebuild hits about 2500 of the mentioned 4000 products. Then suddenly it says no results found. Really weird, we’ve invested a lot of time into the issue and hope we can somehow get it fixed.

    If you have any input, idea, whatsoever, we’d be really thankful!

    Sebastian

    #38440

    Ross
    Keymaster

    Hey Benoit

    Try the following:

    1)

    Change the results container to:

    #portfolio-grid

    2)

    Lets make a new template only for S&F results, because we want to make some customisations and not affect the rest of the site…

    So duplicate the file page-Portfolio3Cols-filterable.php and rename this to search-filter-results.php

    Then, via email, can you send me this file?

    Thanks

    #37951

    Ross
    Keymaster

    Hi Jeff

    I did a quick test as I hadn’t personally used that WP function before.

    If you are using the shortcode method for displaying results, then edit your results.php template and on line 52, after the $query->the_post() add it there.. so the start of your while loop should look like:

    <?php
    while ($query->have_posts())
    {
    	$query->the_post();
    	
    	?>
    	<?php echo get_post_mime_type(get_the_ID()); ?>
    

    Notice I also added get_the_ID() which is sometimes not necessary but a good way to it.

    Now you can access what file type they are 🙂

    Thanks


    Ross
    Keymaster

    How are you using results.php?

    Can you send me a link to the page?

    Thanks


    Anonymous
    Inactive

    Fatal error: Call to a member function have_posts() on a non-object

    How can i resolve this.
    This is showing in results.php

    #37193

    Anonymous
    Inactive

    hi ross,
    i don’t think so, because i copied the loop-single-topic.php into results.php and this is what i get.
    any ideas what can be wrong?.
    another thing is that after getting the results the search form stops working.

    #36574

    Anonymous
    Inactive

    hmmmm ok & SORRY! I think there was something wrong with the results.php …. deleted everything and now it seems to word again.

    #36573

    Anonymous
    Inactive

    Ok one more thing i found out. It just happens when i create a search-filter folder in my theme directory where i put the results.php in ….

    #36519

    In reply to: Issues with Pagination


    Ross
    Keymaster

    Hey Travis are you using the shortcode method to display results? (hence using the results.php)? Then in this case, you will notice that they actually pass the custom query to the pagination function(s).

    Therefor you need to use the pagination variable too:

    So

    'current' => max(1, get_query_var('paged')),

    Should become something like:

    'current' => max( 1, $query->query['paged'] ),

    So the paged var inside the custom query (the shortcode method) is used rather than the global var.

    Thanks

    #36511

    Anonymous
    Inactive

    Hello,

    I’m running into an issue with pagination on the results page. The “next_posts_link()” and “previous_posts_link()” pagination that comes with the default results.php file works, but it doesn’t seem to work when I try to use the paginate_links() function. When the page is initially loaded, the pagination links work. For example, the links’ href are “?sf_paged=2” and so on. But, when I click on a page link in the pagination and the new page loads, the pagination links no longer work. they now all have hrefs as “?sf_action=get_results” and don’t link anywhere. Pagination links also won’t work when a filter is chosen. all the pagination links become “?sf_action=get_results&_sft_classification=oversight-and-development” or whatever the chosen filter is.

    For reference, here is the pagination code I’m using:

    <?php 
    	global $wp_query;
    	$big = 999999999;
    	if ($query->max_num_pages > 1) {
    		echo '<div class="pagination">';
    		echo paginate_links(array(
    			'base' => str_replace($big, '%#%', get_pagenum_link($big)),
    			'format' => '?paged=%#%',
    			'current' => max(1, get_query_var('paged')),
    			'total' => $query->max_num_pages,
    			'prev_text' => __('< PREV'),
    			'next_text' => __('NEXT >'),
    		));
    		echo '</div>';
    	}

    Thank you for your help.

    Travis

Viewing 10 results – 1,161 through 1,170 (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.