Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 601 through 610 (of 1,224 total)
  • Author
    Search Results
  • #145467

    Trevor
    Participant

    If you are using the shortcode display results method, you will be using our results.php template file to display the results. See this post if that is the case (otherwise let me know which method you are using):

    https://support.searchandfilter.com/forums/topic/force-selection/#post-87657


    Anonymous
    Inactive

    Thanks for this! So I’m using the new results.php under search-filter directory that I created. There are php snippets already in there.

    <?php the_category(); ?>
    <?php the_date(); ?>
    <?php the_permalink(); ?>”>
    <?php the_excerpt(); ?>
    <?php the_permalink(); ?>”>
    <?php the_title(); ?>

    Where are these defined? How do I see all of them associated with my custom post type?

    I was trying to move <?php the_category(); ?> to my custom HTML but the snippet is bringing back HTML.

      and

    • tags. All I want is the name of the category (text only). How can I change that?

      How do I get the category permalink? I tried <?php the_category_permalink(); ?> <?php the_categorypermalink(); ?> these don’t work. There has to be a snippet for it?

      As I was testing I thought about how I can bring back the author name. So I tried <?php the_author(); ?> . It worked! Is there a way to see ALL snippets associated with my custom post type Game Review?

      https://www.vrfitnessinsider.com/reviews/
      Here is a post
      https://www.vrfitnessinsider.com/review/game-review-testing-4/

      Thank you for any help you can give!


    Anonymous
    Inactive

    Thank you for your support! I have followed the directions and have created a new directory and am modifying the new results.php. Is there a way to find all of the php snippets that are available on a page? Example: I created a custom field called “Developer” and want to display that on the search results. How do I find the php snippet for that or anything else that is exposed on the post type?


    Trevor
    Participant

    The style of the results depends on the Display method you use (as you say, you are using the Shortcode one right now). You would need to cutomise the results.php file, using php snippets from the WordPress Codex and other resources. Start here though:

    https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/#Customising_the_Results

    There is, for example, a free addon for Search & Filter pro for Visual Composer/Page Builder, which means you can use their Post grid element and then use their tools to style it. See this post:

    https://support.searchandfilter.com/forums/topic/can-we-change-template-desing/#post-136727

    #144261

    Trevor
    Participant

    The change I thought I had seen, I do not see. I have tried to get Search & Filter Pro working with your theme (which means using either As an Archive OR Post Type Archive) but neither will work, AND you cannot have more than one form using Post Type Archive. It causes all manner of problems.

    As the theme is a custom built theme, we need to come at this from another approach, and use the Using a Shortcode display results method, as described here.

    At first try it on a new page with the two required shortcodes just to see if it works. The follow the customisation guide in that article and edit the results.php file to output your grid instead. And work our way forwards.

    #144119

    Anonymous
    Inactive

    Hi Trevor,

    Switching to using the shortcode for results helped me greatly, it’s also working with Ajax. Is this the way to go when showing results on a taxonomy archive?

    I’ve created a custom template for showing the results and this works good as well. The only problem I’ve got is that the template file needs to be called ‘results.php’ or ‘166.php’ (the ID of the form). It doesn’t seem to be possible to use the slug of the form for the template name, am I right about that? This gives me problems since the ID’s are different locally and on the server.

    Also, I want to use the same form for all taxonomy archive pages (would be better not to need to create a form per term), but in that case I’ve got a problem with the ‘Results URL’ for the shortcode display. What do I need to insert there in this case? For now I’ve just disabled the ‘make searches bookmarkable option’.

    #144027

    Anonymous
    Inactive

    Hi Trevor, I use the results.php standard, but customized to show results like I want, and infinite scroll is working as expected, I don’t understand why should I use the other one, if it’s working?

    #143647

    Trevor
    Participant

    Possibly. When you made the results.php file above, from the Search & Filter Pro plugin templates folder, which file did you use? There is the standard results.php and one for infinite scroll (it must be (re)named results.php when used). The structure (HTML classes) are important.

    #143424

    Trevor
    Participant

    It will require some coding skills, but it is not hard. You first need to read this page in our documentation.

    You can change the HTML, the style tags, delete stuff, add stuff in the copy of the results.php file.

    I think this is the code you need (I am not sure though):

    <?php echo wp_get_attachment_image( get_the_ID(), "thumb", "", "" );?>
    

    This is from some code I wrote I while ago, here is a sub sample of the whole thing:

    while ($query->have_posts()) {
      $query->the_post();
      $gallery_link_url = get_post_meta( attachment_url_to_postid(wp_get_attachment_image_url( get_the_ID(), "full", false )), $key = '_gallery_link_url', $single = true);
      if ($gallery_link_url == "") $gallery_link_url = "#";
      ?>
      <div>
        <h2><a href="<?php echo $gallery_link_url; ?>" target="_blank"><?php the_title(); ?></a></h2>
        <a href="<?php echo $gallery_link_url; ?>" target="_blank">
      <?php 
        echo '<span class="responsive">';
        echo wp_get_attachment_image( get_the_ID(), "thumb", "", "" );
        echo '</span>';
      ?>
      </a>
    		</div>
    #142875

    Trevor
    Participant

    There appear to be some HTML errors in there. This line has a closing </p> tag that doesn’t appear to have an opening tag:

    <div class="desc"><?php the_excerpt(); ?></p></div>

    And just after the READ MORE line are two closing </div> tags, but seems to be unpaired. Maybe.

    You mention Infinite Scroll. Have you set this in your theme or in our plugin, as there is a different results.php file for this.

Viewing 10 results - 601 through 610 (of 1,224 total)