Search Results for 'results.php'

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

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

  • Anonymous
    Inactive

    Hi.
    I’m purchase search & filter pro, and this is absolutely amazing.
    But i need any things.
    1-) Is possible print custom field of custom post type in results? I try this code, but dont work in results.php from template folder:

    <?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
    		<div>
    			<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
    			<p><?php the_excerpt(); ?>
    			<?php
                              $post_object = get_field('pastilha_dianteira');
                              if( $post_object ): 
    
    	                  // override $post
    	                  $post = $post_object;
    	                  setup_postdata( $post ); 
    
    	                ?>
                            <?php the_field('numeracao_pastilha'); ?>
                      </div>
                      <?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>
                     <?php endif; ?>
    		</div>
    		
    		<hr />
    		<?php
    	}
    	?>

    Any suggestion?

    2-) I need in results the taxonomies from that result. Example:
    TITLE OF POST – Taxonomy 1, Taxonomy 2, Taxonomy 3
    Content
    What’s code for it?

    Sorry for english.

    Cheers.

    #41609

    Anonymous
    Inactive

    Hi I am not very good in php, I used this plugin to filter some job posts that I pulled from jobadder xml files. I have created a folder search-filter and results.php in it. All seems Ok but when I filter it seems not working.

    Can I contact author privately sharing my user and pass ?

    #41261

    Trevor
    Participant

    This file:

    \theme49465\ search-filter-results.php

    You gave me the contents of that five or six posts ago, yes? If that was the file you gave me the contents for, it is that one I mean for you to edit and replace the code with mine.

    #41258

    Trevor
    Participant

    No. Remove that functions.php stuff, you don’t need it. The code I gave you is the new search-filter-results.php file. replace the contents of that file Ross gave you with my code, but change the title (look in the code for it) as you wish.

    #41242

    Trevor
    Participant

    OK

    In the form is see that the results template is this search-filter-results.php

    This is one that you made? Using code tags from the editor (see the top button bar) before and after the code, can you paste the contents into a private reply?

    I cannot see this template file in the theme editor?

    #41036

    Anonymous
    Inactive

    Thank you for your swift reply.

    What I would like to have is a Search&Filter search result that looks exactly like the “normal” search result. I understand that this is not part of the S&F support. I had no idea if it is easy or not to achieve this. I showed you the search.php file and was hoping you say something like, “okay this is easy, just copy this part of the code in the results.php file and you’re done”. I don’t want to try your patience too far. I simply had no idea what is easy to achieve and what not.

    I don’t know what you mean with the “set a slug” and the Url.
    My problem with the archive display are:
    + The results are shown in another tab. I don’t see the search form and the results on the same page
    + You documentation says the Ajax is slower.

    #41028

    Anonymous
    Inactive

    Thank you for your reply. I’m sorry for not being more clear.

    Requirements:
    1. Place search results and search on the same page. Test Page

    2. Use the same formatting of results from my theme that display when I use the Archive display method with my default custom template Search.php Example

    I’ve already completed this task from documentation

    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

    But I can’t figure out how to edit the file provided Results.php file to return the same styled results as my theme’s Search.php

    Thank you for your help,

    Joshua

    #40960

    Anonymous
    Inactive

    Now I see the problem.
    I did not make any changes to the results.php file to customize it but just copied it.
    Sorry, I am new to this.

    I now opened the results.php in an editor and I also opened the search.php from my template.
    Do I have to copy the whole text from the search.php to the results.php?

    #40958

    Trevor
    Participant

    Ah. If you edit the results.php file that you copied to your (child) theme folder, you will find this code in the middle of it (I have edited it a bit to compress it, but it looks somewhat like this):

    <?php
    while ($query->have_posts())
      {
        $query->the_post();
    ?>
    <?php /* echo get_post_mime_type(get_the_ID()); */ ?>
    <div>
      <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>
    </div>
    <hr />
    <?php
    }
    ?>

    Try replacing that with this:

    <ul class="custom-sf-results-list">
    <?php
    while ($query->have_posts())
      {
        $query->the_post();
    ?>
    <?php /* echo get_post_mime_type(get_the_ID()); */ ?>
    <li><div>
      <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>
    </div></li>
    <hr />
    <?php
    }
    ?>
    </ul>

    Not sure if that will work.

    #40940

    Trevor
    Participant

    From the documentation (I think this is what you want):

    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

    From now on, Search & Filter will load this version of the template instead of its own – so you can make any customisations that are necessary.

Viewing 10 results – 1,141 through 1,150 (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.