Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 191 through 200 (of 1,224 total)
  • Author
    Search Results
  • #236916

    Trevor
    Participant

    Can you do a simple test for me?

    Rename the results.php template in the child theme -> search-filter sub folder to something like results.old, so that the plugin will then use the default one in the search-filter-pro -> templates folder.

    Then, set the pagination in the form to Normal.

    Now does it show the 15 posts?

    #236841

    Anonymous
    Inactive

    I put everything together this weekend, and it worked out great. The page is in the Beaver Builder page builder, so I can place the two shortcodes wherever I want.

    1. I used the Shortcode Display Option, which is what displayed the products as posts instead of products.
    2. I copied the “results.php” file into the template files. (One little problem was that I used “search-filter-pro” as the folder, and it needs to be “search-filter”.
    3. It was easier than I thought to make the post look like a product. I just deleted the date and description from the results layout, and then added a button with a link to the product underneath it.
    4. The rest is just CSS. For devices over 700px in width, I set the width to 33.3% and float:left to the div around the product.

    Here is a link to the dev page:

    https://gco.cybernet-host.com/filter-glasses/

    (This link may not be there forever. One reason I couldn’t use the built in Shop option is because this format needs to be repeated 4 times.)

    The other idea I had was to make multiple shop pages, but I didn’t go that route and I am glad I didn’t. It was very easy to make the post layout look like a product layout.

    Thanks for your support and for a great plugin!

    #236627

    Trevor
    Participant

    Which Display Results Method are you using in the form?

    If you are using the Shortcode method, add the free WP-PageNavi plugin. The results.php file has code to use that plugin if installed.

    #236176

    Anonymous
    Inactive

    Hello again, looks like my issue is very entry level but I’m still having trouble getting the selected category’s description.

    I simply added <?php echo category_description(5); ?> into the results.php, so it displays the description of category ID “5”, but obviously this won’t show other categories’ descriptions when they’re selected. I expected it work if I leave the ID number out, but it didn’t. Any ideas?


    Anonymous
    Inactive

    Thanks for a great plugin!

    I´m using SF with WP job manager and would like the search results to display the same way as when using the built in filter in WP job manager. I have tried using what I assume is the template for displaying search results in WP job manager specifically content-job_listing.php by copying it to the theme folder as explained in the docs. This does not work, maybe I´m using the wrong template or something. But the results does not display the right way.

    So now I´m wondering if I can edit the SF results.php template in a way that would fetch the meta information in the WP job manager job_listing custom post type. Meta like location, company thumbnail, job expiration date and so on, and display it in the search results. Then I could style it with css myself. Is there a way to do this? I´m not a very advanced user so I probably need a little dumbed down explanation.

    Kind regards
    Martin

    #235017

    Trevor
    Participant

    IF you are modifying a theme template, you should be using a child theme and should place the modified template in the child theme folder. This stops it been replaced when you update the theme.

    If you are using our Shortcode display results method, then the default template is the results.php file found in the plugin folder templates sub folder. YOU SHOULD NOT edit that file, as it WILL be replaced upon updates. Instead, follow the customising guide here:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results


    Trevor
    Participant

    OK. I need for you to make a test. Duplicate the form, but set it to Shortcode display results method. You will need to make a test page for this in WordPress with the form and results shortcode on the page.

    In your theme or child theme, make a sub folder named search-filter

    Copy the file results-infinite-scroll.php from the templates sub folder in our plugin folder to that new search-filter folder, and then rename the file in that search-filter sub folder to results.php

    Be careful to rename the file in your theme sub folder, and it must be directly in that search-filter sub folder, not one named templates. The sub folder must be named search-filter and not search-filter-pro.

    Enable the Infinite scroll in this new form, but make sure the Post / Result Selector and Infinite Scroll Container settings are empty.

    Now test this search on that new page.

    #234545

    Trevor
    Participant

    It does not need the templates sub folder. If you use that, it will not work. The results.php file should be directly inside the search-filter folder. Some people also mistakenly name this search-filter-pro, which it should not be.


    Trevor
    Participant

    Do you prefer the page to be empty, or maybe a message?

    It looks like you are using the Shortcode display results method, in which case you should follow the ‘guide to customising’:

    https://support.searchandfilter.com/documentation/search-filter-pro/search-results/using-a-shortcode/

    Once you have a copy of the results.php file in a search-filter sub-folder of your theme, you can edit that file, like this (leave the PHP comments at the top outside and before this code):

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(3204)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
      echo '<div>Nothing to see here folks!</div>'; 
    } else {
      // the current resuts.php code here
    }
    #234526

    Anonymous
    Inactive

    Hi,

    According to this documentation I should be able to adjust the results.php:

    Customising the Results
    If you wish to customise the display of your results, you must override the default template that is being used by Search & Filter:

    Create a folder in your theme folder called search-filter.
    Copy the file wp-content\plugins\search-filter\templates\results.php from the templates folder in to the newly created folder in your theme – wp-content\themes\your-theme-name\search-filter\results.php

    Unfortunately this does not seem to be working? I am using a child theme, so I created the folders in my child theme, but I only see changes when adjusting the results.php directly in de plugin. Is there something missing in the documentation above? I already added the folder /templates which seems to be missing in the text.

    Thank you for your help.

    Regards,

    Richard

Viewing 10 results - 191 through 200 (of 1,224 total)