Search Results for 'results.php'

Forums › Forums › Search › Search Results for 'results.php'

Viewing 10 results – 411 through 420 (of 1,344 total)
  • Author
    Search Results

  • Anonymous
    Inactive

    Hi,

    I’m using the filter and results shortcode on the same page (homepage);
    https://gloryquotes.com/
    The results don’t show after I rebuilt the cache. But there are like a 100k posts (custom post types), is that the reason? I do use a custom ‘results.php’ page. But that worked fine with fewer posts.
    It does show results and filter while it’s rebuilding the cache, but when it’s done, the page is blank.

    Thanks!

    #200548

    Anonymous
    Inactive

    I am using a Post Type Archive within Beaver Themer. I found the results.php template, but am unsure what to do next?

    #200433

    Trevor
    Participant

    What Display Result method are you using? It IS possible, but you need to be done in the template being used for the results. That might be buried so deep in code it would be impractical to do though.

    It is implemented in our Shortccde display results method, and you can see an example of the code if you look in the folder our plugin is in on your server, inside a templates folder and see the results.php template.

    #200212

    Trevor
    Participant

    OK. I have looked at the code. I can see when (not critical to this question) code errror, on line 217:

    <li><i class="fas fa-users"></i>Activiteit</i></li>

    This should be:

    <li><i class="fas fa-users"></i>Activiteit</li>

    What I would do is to have 2 results.php templates. Name them after the ID number of the form. So, the current form is 207. Let us say that the new form is ID 1234.

    We will use the current form as is, and the new form is a duplicate of the form 207, except that the post per page is set to -1 and Ajax is OFF.

    Place the code for the map into 1234.php

    leaving only the code for the results in 207.php. Before that code, place a do_shortcode for the new form’s shortcode (outside the infinite scroll container).

    <?php do_shortcode(‘[searchandfilter id=”1234″]’);`

    Does that make sense?

    #200130

    Trevor
    Participant

    How did you get the map to work?

    Are you able to make the results.php template file available to me (from a file sharing site maybe)?

    I suspect that what you want may be difficult to achieve. As it is, the map is very slow to load.

    #200124

    Trevor
    Participant

    Hi

    This is an alternative exemplar results.php file content that might do as you want:

    <?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
     }
    }
    ?>
    #200092

    Trevor
    Participant

    The URL above is not made by our plugin. The search on that page obviously is, but when the search suggested is made, the URL does not change.

    I can see our javascript file being loaded, and there are no errors.

    I can see that you are using v2.4.0 of our plugin, which is quite old (we are currently on 2.4.6), but you may need to upgrade it manually as we have changed domains and the version you have may be looking for updates on the wrong server.

    Once you have updated, can you create a test search page, using a standard results.php file, to see if that works. You may need to give the results.php file the name of the form ID to stop it conflicting with the current setup. So, if the test form is ID 44000, name the file 44000.php

    #199759

    Trevor
    Participant

    It appears as though your are using the Shortcode Display Results Method. It looks like you are using a modified version of the results.php file.

    The content you see comes from that file. It is calling up the content probably from the WordPress the_content() function, over which we have no control. What you could do is to show/reveal the Excerpt meta box in the editor and create a custom excerpt for it to use instead.


    Anonymous
    Inactive

    Hi Trevor,

    I have 2 different templates set up in my theme’s folder (results.php) — one for infinity scrolling, and the other for standard pagination. Both are working fine, but I’m wondering if there is a simple way to allow the user to decide which method of pagination to use for a particular search (e.g., giving them a radio box to select “Type of Pagination”)–so which would then decide which template to use.

    (We will have a very large directory, which will be set up alphabetically, so sometimes they may prefer to use standard pagination so they can just jump forward or back several pages; but other times, when shorter lists are present, it’s more convenient just to infinity scroll).

    Also, as an aside question, do you have an estimate as to when the Version 3 will be ready–I’m looking forward to being able to separate the search form so that some search categories are on top of the form and others are along the side.

    Thanks,
    Paris

    #199691

    Anonymous
    Inactive

    I tried both but it wasn’t working. I now copied the page navigation from results.php file in the plugin templates folder and it’s getting somewhere, thanks!

    It shows the correct number of pages and links to older/newer posts. But there’s no page numbers so the user can navigate to page 5 for example. Now they have to click 5 times on the older posts link to go to page 5.

Viewing 10 results – 411 through 420 (of 1,344 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.