Forums Forums Search & Filter Pro Fatal Error – results php template

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Anonymous
    #55333

    Hi there,

    I am trying to customise my results template, and after adding in this new template, I receive this error:
    Fatal error: Call to a member function have_posts() on a non-object in xxxxxxxxxxx /themes/ theme/search-filter/results.php on line 25

    This is my setup:
    https://support.searchandfilter.com/forums/topic/split-custom-taxonomies-not-displaying-in-results/

    It may be because there are too many loops here? As on my filter & results page I have:
    2 shortcodes (filter + results shortcode) + results php template (which has its own loops).
    Not sure…

    And I followed the instructions here, to override the default template:
    http://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/

    ps: Trevor your login details in the previous post are still valid

    Any ideas?

    Many thanks,
    Brett

    Anonymous
    #55336

    forgot to mention…

    The results template in my theme is the same (copied) as the one in the SF Pro plugin folder:
    SF Pro > Templates > results.php

    Line 25 is:
    if ( $query->have_posts() ) …….. etc.

    Trevor
    #55337

    I would need to see the whole file (please use the code tags before and after the code – there is a button in the editor, or you can use the backtick, the key next to the 1 on the keyboard).

    Anonymous
    #55344

    Hi Trevor,

    After checking this, I discovered it was my error – as the template was slightly changed (from original S&F plugin template file.

    So I re-uploaded it with no issues now.
    Apologies for this, of course you may now close this ticket.

    ps: I’d just like to say thanks for the super fast support, it is really appreciated 🙂

    Trevor
    #55345
Viewing 5 posts - 1 through 5 (of 5 total)