Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 1,201 through 1,210 (of 1,224 total)
  • Author
    Search Results
  • #5614

    Anonymous
    Inactive

    Hi,

    I also cannot make the Ajax results page look good. I would like to have the basic layout in the “results.php” to be the same as in the normal archive/search pages in my theme, but I cannot make copying elements from the theme’s search.php work at all.

    Without Ajax it works fine and I have read the short toturial text without any success when it comes to making the styling look like the rest of the theme.

    Can you help me out?

    #5609

    Anonymous
    Inactive

    Ross, please I would really need some guidance from you.
    I don’t know if I understad this correctly, but what might solve all of the issues is this (if this plugin allows this):

    In plugin settings not using the “Use a custom template for results?” at all. So it doesn’t use the results.php file.

    In the AJAX section not ticking the option “Use a Shortcode to display results?”

    And choosing the right “Content selector:” – this is what I do not know how to do to make it work.
    If this is the way to get the filtered results this would be the ultimate solution.
    Please help, thanks

    #5538

    Anonymous
    Inactive

    Hello,
    I’m not sure if I’m doing something wrong or I’m trying to achive something that is not possible.
    I’m building different search forms where I need to use different templates for the results.

    I’ve been able to custom the results.php file to show everything how I want it on my SearchForm1 but… what if I want to use a another template (results2.php) on a SearchForm2… for example?

    I’ve checked on the forum and documentation and is not clear to me if I can do and how ..

    thanks in advance !

    #5359

    Anonymous
    Inactive

    Hi Ross,
    Can you take a look at this when you get a minute? I’ve placed the code in an external js file now and link to it in the results.php file. I’ve created the theme from scratch so I don’t have a main js file. Till now I’ve included links to theany necessary libraries in the header, and kept more specific code inline in the documents.

    #5272

    Anonymous
    Inactive

    I’m fairly new to Javascript but I don’t believe the final }); is unnecessary as it corresponds with the ajaxfinish function and the code before that matches the isotope function.

    I’m running it locally at the moment but I will reactivate my license on the live site and get back to you.

    Do you have any recommendations on where to place the script? The only time the js layout worked with the plugin was when I placed it at the bottom of the results.php file, without the hook involved. This worked for the initial page load but not with subsequent filtering.

    $(".searchandfilter") Can you explain this part of the code, is it a class selector?

    Thanks again.

    #5105

    Anonymous
    Inactive

    I’m trying to use a layout script (Isotope) to display my results. When I add the code to the bottom of the results.php, it displays fine on the first page load but upon filtering the results, returns to normal styling. However, when I place my script inside the function from the FAQ, the javascript layout does not show on the initial page load nor after filtering and nothing is logged to the console either.

    $(".searchandfilter").on("sf:ajaxstart",function(){
    console.log("ajax start");
    });
    
    $(".searchandfilter").on("sf:ajaxfinish",function(){
    console.log("ajax complete");
    
    var $container = $('#sf-results-294');
    // init
    $container.isotope({
      // options
      itemSelector: '.item',
      layoutMode: 'cellsByRow',
        cellsByRow: {
      columnWidth: 190,
      rowHeight: 230
    },
    });
    
    });

    Any guidance?
    Thanks

    #4962

    Ross
    Keymaster

    Hey Marjan

    This take a little work but shouldn’t be too complicated.

    You need to open your themes search template (probably ‘search.php’) and copy the html from there in to your new ‘results.php’…

    This is probably your best option for setting it up with that layout. Just remember to keep the while loop from the Search & Filter template, and not the search.php template (everything inside can be replaced).

    while ($query->have_posts())
    {
    	$query->the_post();
            ...
    }
    

    I will write a tutorial on this at some point.

    Just be careful, where you place the results shortcode (‘[searchandfilter id=”1″ show=”results”]’) as the html structure of your page will need to be similar/the same.

    Let me know how you get on.

    #4941

    Ross
    Keymaster

    Ah hey Marion, yeah I see where the confusion is – glad you got it working ok.

    Best
    Ross

    #4931

    Anonymous
    Inactive

    Never mind. I figured out that I still had the wrong path.

    I changed it to …/themes/viva/search-filter/results.php

    This is a little confusing because the child theme path usually needs to exactly mirror the parent path. But, it works now.

    Thanks,

    Marion

    #4927

    Anonymous
    Inactive

    Hi,

    I have followed the instructions for placing the results.php file in my child theme but search and replace does not seem to be finding my file. Specifically, I changed the code in my new results.php to show the_content() instead of the_excerpt. You can see my test page at:

    http://www.vivaconsult.net/wordpress/database-test-page/

    my results file is in

    /home/vivaconsult/public_html/wordpress/wp-content/themes/viva/search-filter-pro/templates/results.php

    I also tried matching the documentation by changing search-filter-pro to search-filter (although that seemed wrong since that didn’t match the plugin path) but that didn’t work either.

    /home/vivaconsult/public_html/wordpress/wp-content/themes/viva/search-filter/templates/results.php

    All the forum entries on this topic advise to follow the new documentation which I have tried to do. I would appreciate any insight.

    Thank you,

    Marion

Viewing 10 results - 1,201 through 1,210 (of 1,224 total)