Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 1,011 through 1,020 (of 1,224 total)
  • Author
    Search Results
  • #44338

    In reply to: Configure not showing


    Trevor
    Participant

    Ah, I see. The layout of the post results is pretty much theme dependent. The demo is using one of the standard WordPress themes. By default, the layout of the results is down to the theme you are using.

    The first thing is get the search functional, and then focus on appearance. Do you want it to look like that portfolio page you showed?

    Do you have a working search to show me using the shortcodes method (the template must normally be results.php BTW)?


    Trevor
    Participant

    Hi

    I will take these in reverse order!

    3. Post type archive. In the theme, you have to place the search form using a widget area, by using the provided shortcode or search form widget. That assumes your theme gives you such a widget area. Failing that, you have have to manually edit the template.php for the page in question and add the shortcode using the wordPress do_shortcode function.
    2. As an archive is the more complex and does require you to understand where and how to edit the theme’s files. Not easy if you do not know how.
    1. As with 3, you still have to place the search shortcode on the page, but this method uses a template from within Search & Filter’s template folder, called results.php. You can copy this to your child theme folder (the instructions are on the documentation page) and the file is deliberately made less complex to allow easy editing, usually by cut and pasting the bits to where you want them, or removing bits, and the add HTML classes and id’s and other HTML structure so that the page matches what you see on a normal page in your theme.

    #43788

    Trevor
    Participant

    Hi

    Try this:

    https://www.dropbox.com/s/73qfwma87p5efo8/results.php?dl=0

    But edit line 25 and replace the ID number i used (1726) with the ID of your search form.

    #43581

    Anonymous
    Inactive

    Hi Trevor,

    I’ve tried using the Github code on my results.php but its not working. May I send you my page so you can see what I’m doing wrong?

    Thanks,
    Thalia

    #43573

    Anonymous
    Inactive

    Hello Ross,

    I needed a form to display results using Post Type Archive but I can’t have two forms (or more) that displays results like this, so I had to use Archive (which in my theme looks like a blog and it’s not useful for me).

    So I spoke to Trevor about it and we had a skype videocall in which we found out that Avada wouldn’t let me use a custom results.php page.

    The reason I need a custom results.php is because of the way search results are displayed in my website.

    This is the form that displays results using Post Type Archive: http://www.edulynks.com/prueba
    I use this form to search the availability of schools depending of the type of program (academic years, summer camps, etc) and country (USA, UK, France, etc).

    This is the form that filters results within a type of program using Archive: http://www.edulynks.com/campamentos-de-verano
    I use this form to filter schools within a type of program, for example, if the program is summer camps, I want to filter those summer camps depending of the country (summer camps in canada, summer camps in france, etc).

    Originally what I wanted to do is use the Post Type URL to display results like Post Type Archive like I read here but I found out that it wouldn’t work because of Avada, so Trevor suggested that I use a custom Archive page (results.php). I placed my custom results.php in the /themes/Avada/search-filter directory but it’s giving me an error: “Error: The custom template file results.php cannot be found”.

    Please tell me if I explained myself clearly or if you need extra information 😀

    Thank you!


    Trevor
    Participant

    The results you see are either made by a template in the theme, in which case you need to revert to the theme controls, or you are using the shortcode method, and using our results.php, in which case you can make one or more custom versions of the results.php file and place them in the child theme folder. In that you can add your own css classes and HTML structure, or decide what to show (or not). See here:

    http://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/

    #43381

    In reply to: Remove 'Results Found'


    Trevor
    Participant

    I think you would need to edit and remove lines 29 and 30 of this file:

    results.php in the templates folder. Depending on the display results method you are using (I am assuming you are using the shortcode method), you can copy that file to a sub-folder (you need to make this folder, if you don’t already have it, called search-filter) of your theme folder. That way any plugin updates won’t break this change. The lines look like this:

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

    See the documentation here (the Customising the Results section):

    Using A Shortcode

    #43380

    Anonymous
    Inactive

    Hang on! I found your “results.php” in the template folder. I think I got it. Sorry for not looking first, and then asking support. Thanks

    #43260

    Trevor
    Participant

    The only thing that I can see is that as you have selected use custom template the results template is shown as results.php, but I think this needs to be changed to one from your theme; whichever template is used for the search results page in the theme. Alternatively, untick this box and let S&F try to find the template itself (it may fail to find it though).

    #42786

    Anonymous
    Inactive

    Thanks Trevor!
    I am using a theme I started from underscores template

    Installed the results.php template and I am trying to use the github code here as reference.
    but no luck yet..

    Any chance you can guide me a bit further?

    Where do I place the following code in my results.php if it needs to be before the “have_posts” loop?

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(1726)->current_query();
    echo $sf_current_query->is_filtered();
Viewing 10 results - 1,011 through 1,020 (of 1,224 total)