Forums Forums Search & Filter Pro Help with search results formatting

  • This topic has 7 replies, 3 voices, and was last updated 10 years ago by Anonymous.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Anonymous
    #7427

    Hello,
    Great work on the plug-in. If possible can I ask for some formatting help?

    Here’s my test website: http://theriftarcade.com/market/test/

    The site uses Easy Digital Downloads, and shows products as grids with a nice custom-made thumbnail.

    If you use Search Filter Pro you’ll notice that search results look really messy, displaying a name and large image that stretches across the page. I’d like them to display as grids as seen on both the home page and search results page. Is this possible?

    Also, I’ve noticed that when I select a check box filter from the home page I’m taken to the results page but the check box isn’t selected anymore, so I have to re-select it to get the proper results. I’ve checked “Maintain Search Form State” in the settings panel, so I’m not sure why it’s not saving.

    Thanks,
    Tom

    Ross Moderator
    #7449

    Hey Tom

    Thanks for the info, RE the checkbox filter – I’ve just noticed this is a bug – because you are not using permalinks and using Post Id the plugin has an error – I will test and fix this soon.

    RE the layout

    Customising your results is a little out of scope of support of the plugin but I’ll try to help point in the right direction:

    First you must copy over the template files to your theme, as per these instructions:

    http://www.designsandcode.com/wordpress-plugins/search-filter-pro/docs/#docs-new-ajax

    Once you have done that we can begin customising your results..

    For all templates you will find a while loop – this is how it loops through your posts and displays your pages and results.

    So to copy the style of your search results page to this one, I would take a look at the template for displaying your search results (probably search.php), and find the while loop.

    Then open results.php – the template you copied over from the instructions, and you will also see a while loop. Although the loops are a little different, you should be able to copy over the HTML from search.php to results.php.

    This is the basic approach to copying over the layout from these files 🙂

    Hope that helps!

    Anonymous
    #7468

    Hi Ross,

    Thanks for your help so far!

    I haven’t managed to get the formatting working yet. Here’s what’s inside my search.php file:

    $post_type = get_query_var( ‘post_type’ );

    if ( ‘download’ == $post_type )
    locate_template( array( ‘archive-download.php’ ), true );
    else
    locate_template( array( ‘index.php’ ), true );

    It doesn’t work when I copy it into the results.php file. Same funny-looking layout. I’ve spent five hours fiddling with code today but no luck yet 🙁

    Anonymous
    #7512

    Hi Ross,

    It looks like my site uses Salvattore to render the grids in search results, but because Search and Filter Pro uses AJAX for dynamic rendering, Salvattore isn’t displaying the columns correctly.

    However, Salvattore can dynamically render content, but I don’t understand the instructions. They’re on the bottom of this page: http://salvattore.com

    It looks like I need to add “salvattore[‘append_elements’](grid, [item])” somewhere. Any ideas? I know this is a long stretch but I thought you might be able too help!

    Thanks,
    TOm

    Ross Moderator
    #7636

    Ah yes Tom I follow you, basically, once the results are loaded in you want to apply Salvattore to them?

    In this case take a look at the first question here: http://www.designsandcode.com/wordpress-plugins/search-filter-pro/faqs/

    You need to add this JS code to your theme:

    $(".searchandfilter").on("sf:ajaxfinish",function(){
        alert("load salvatorre here!");
        //so load your lightbox or JS scripts here again
    });

    This is fired once S&F has got the ajax results – so you should add in the Salvatorre init code where you see the “alert”.

    Let me know how you get on.

    Thanks

    Anonymous
    #7654

    Hi Ross,

    Ah, that looks helpful. I spent a couple of hours looking through my site/theme but couldn’t work out where to put it. Not to worry though, because I’ve disabled AJAX for now and I’m happy with the result. Here’s the live website if you want to check it out: http://theriftarcade.com/market/

    Thanks for your help!!

    Ross Moderator
    #7655

    No problem, the site looks nice!

    Anonymous
    #8017

    Hi Tom/Ross,
    sorry to butt in, but I notice on Tom’s site that when you type in the search box, it starts offering suggestions in a drop-down, which you can then pick from. Cool!

    Is that an option I have missed? I’m not using Ajax, but you said you weren’t either.
    I can’t see how to do that with the options I have.

    Than you,
    Philip.

Viewing 8 posts - 1 through 8 (of 8 total)