Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 161 through 170 (of 1,224 total)
  • Author
    Search Results
  • #243260

    In reply to: styling search results


    Trevor
    Participant

    Comparing the two forms is not easy, as you have dropdown selects in one and checkboxes in the other?

    I DO see an issue with the infinite scroll that needs fixing, where it shows No Results at the bottom. This is a modified version of the standard infinite scroll results.php file to stop it from happening:

    <?php
    /**
     * Search & Filter Pro 
     *
     * Sample Results Template
     * 
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      http://www.designsandcode.com/
     * @copyright 2015 Designs & Code
     * 
     * Note: these templates are not full page templates, rather 
     * just an encaspulation of the your results loop which should
     * be inserted in to other pages by using a shortcode - think 
     * of it as a template part
     * 
     * This template is an absolute base example showing you what
     * you can do, for more customisation see the WordPress docs 
     * and using template tags - 
     * 
     * http://codex.wordpress.org/Template_Tags
     *
     */
    
    if ( $query->have_posts() ) {
     ?>
     
     Found <?php echo $query->found_posts; ?> Results<br />
     <div class='search-filter-results-list'>
     <?php
      while ($query->have_posts())
      {
       $query->the_post();
       
       ?>
       <div class='search-filter-result-item'>
        <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
        
        <p><br /><?php the_excerpt(); ?></p>
        <?php 
         if ( has_post_thumbnail() ) {
          echo '<p>';
          the_post_thumbnail("small");
          echo '</p>';
         }
        ?>
        <p><?php the_category(); ?></p>
        <p><?php the_tags(); ?></p>
        <p><small><?php the_date(); ?></small></p>
        
        <hr />
       </div>
       
       <?php
      }
     ?>
     </div>
    <?php
    } else {
     
     //figure out which type of "no results" message to show
     $message = "noresults"; 
     if(isset($query->query['paged'])) {  
      if($query->query['paged']>1){
       $message = "endofresults";
      }
     }
     
        if($message=="noresults") {
        ?>
     <div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end'>
      <span>No Results Found</span>
     </div>
     <?php
        } else {
     ?>
     <div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end'>
      <span>End of Results</span>
     </div>
     <?php
     }
    }
    ?>

    As for the styling, might you be able to show me an annotated (naming colors, font family, weight, size) screenshot of the frontend form and what needs changing? You would need to upload the screenshot image to a file sharing site (like the WordPress Cloudup site) and share the link for it with me?

    #242463

    Trevor
    Participant

    Our results.php exemplar template is setup so that, if you install this free plugin:

    https://wordpress.org/plugins/wp-pagenavi/

    Our template will then use the settings in that plugin, and that will give you the options you need.

    #242227

    Anonymous
    Inactive

    Hello!

    I would like to change the results.php file, so I uploaded it to my child theme folder:
    /wp-content/themes/dt-the7-child/search-filter-pro/templates

    Sadly this didn’t do anything to the search results output.
    Could you tell me where to change the file?

    Greetings


    Trevor
    Participant

    I understand. IF all you wanted was to make a new search (and not retain the current search), then you would need to edit the code in the results.php code using our guide to customising and make the link something like this:

    http://mysite.com/my_search_page/?_sft_category=my_category_slug

    #242133

    Trevor
    Participant

    To modify the output of the results.php template file (I have done this for myself on projects, and even some using Avada), I have examined the output HTML on a sample page and reverse engineered that into a combination of HTML and PHP for a custom template. For Avada, it used to typically take 4-8 hours to do though.

    An alternative solution (and what I now do if I am having to use Avada) is to use a plugin that works in a similar way to our shortcode method:

    https://searchandfilter.com/documentation/3rd-party/post-grid/

    In the Post Grid plugin, you determine the number of columns by using the post width setting.

    #242089

    Trevor
    Participant

    The URL/page you gave loads as 404 not found for me? Is it available to a logged in admin?

    In the field design, there is an option to change the ‘Search Operator’ from the default AND to OR. You need to make that change.

    You might use the Shortcode method:

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

    And follow the guide on customising (edit the code in your copy of the results.php file) so that it shows only plain text, and no links.

    #241917

    Trevor
    Participant

    The display of the results is dependent on the Display Results method. You are suing the Shortcode method, which in turn uses our exemplar results.php template. This is only a basic template, and you would have to customize it yourself to change the layout. Some users are OK with this, some are not. Sometimes, it is made easy by your theme, by taking code from an existing theme template.

    The normal category page, how is that built? Does it use a visual builder or theme options, or does the page use a theme template coded to two columns?

    Are you expecting to use this search on other pages? I ask because the Shortcode display results method works only on a single page.

    #241892

    Trevor
    Participant

    Auto Submit is shown here:

    https://www.screencast.com/t/ieXM1PyBwrY

    I have shown it switched off.

    What do you want to change about the appearance/layout/content of the results? Remember, what you see is because the template being used, results.php, is somewhat basic, but deliberately so to allow the site owner to customize it. Do you have a page elsewhere in your site that has the appearance you want?

    #241741

    In reply to: Link in images


    Trevor
    Participant

    as you are using the shortcode display results method, and you appear to have already customised the results.php template file (I hope by placing that modified version in a search-filter sub folder of your child theme folder), this post may be able to show you how to change our standard code to make the image into a link:

    https://support.searchandfilter.com/forums/topic/only-title-search/#post-227954

    #241565

    Trevor
    Participant

    results.php will not change, but I understand.

Viewing 10 results - 161 through 170 (of 1,224 total)