Customize result.php with table

Forums › Forums › Search & Filter Pro › Customize result.php with table

Viewing 10 posts – 31 through 40 (of 41 total)
  • Trevor
    #53855

    Ah, I found the code bugs. It was in our code. I thought this was fixed in the very final release of 2.2.0

    Did you get this installed version from our downloads, or direct from Ross or me?

    Anonymous
    #53856

    direct from the downloads

    Trevor
    #53857

    How odd. Well I have fixed that bit, now I need to write the code. I am about ready to start 😉 I will get some caffeine first !!

    Anonymous
    #53859

    😀 thank you so much!

    Trevor
    #53877

    Hi

    I am still working on this, but I will have to stop and pick it up early in the morning 🙁

    I need rest ..

    Trevor
    #53963

    OK, my first attempt is now live on your site.

    Trevor
    #54101

    as I haven’t heard back from you I hope all is OK? This results.php below works in Divi. The user wanted the results in a column that was 75% of the page width, the search form was in a sidebar in the other 25%.

    The pavigation and post titles are full width, and the content is thumb to the left and excerpt to the right, taking up 1/3 and 2/3 of the 75% column width:

    <?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() )
    {
    	?>
    	<div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_center">
    	   <?php echo $query->found_posts; ?> gefundene Ergebnisse<br />
    	    Seite <?php echo $query->query['paged']; ?> von <?php echo $query->max_num_pages; ?><br />
    
    	    <div class="pagination">
    
    		    <div class="nav-previous"><?php next_posts_link( 'Seite zurück', $query->max_num_pages ); ?></div>
    		    <div class="nav-next"><?php previous_posts_link( 'Seite vor' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	   </div>
       </div>
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    
    		?>
    		<div>
    			<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
          <div class="et_pb_row_inner et_pb_row_1-4_1-2">
            <div class="et_pb_column et_pb_column_1_4 et_pb_column_inner">
              <div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left">
          <?php
            if ( has_post_thumbnail() ) {
              echo '<a href="';
              the_permalink();
              echo '">';
              the_post_thumbnail("small");
              echo '</a>';
            }
          ?>
              </div>
            </div>
            <div class="et_pb_column et_pb_column_1_2 et_pb_column_inner">
              <div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left">
          			<p><br /><?php the_excerpt(); ?><p>
    			      <p><?php the_category(); ?></p>
    			      <p><?php the_tags(); ?></p>
    			      <p><small><?php the_date(); ?></small></p>
              </div>
            </div>
          </div>
    
    		</div>
    
    		<hr />
    		<?php
    	}
    	?>
      <div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_center">
    	Seite <?php echo $query->query['paged']; ?> von <?php echo $query->max_num_pages; ?><br />
    
    	  <div class="pagination">
    
    		  <div class="nav-previous"><?php next_posts_link( 'Seite zurück', $query->max_num_pages ); ?></div>
    		  <div class="nav-next"><?php previous_posts_link( 'Seite vor' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	  </div>
      </div>
    	<?php
    }
    else
    {
    	echo "No Results Found";
    }
    ?>
    Anonymous
    #55023

    Hey Trevor!

    Sorry for not responding as that fast.
    I really want to say thank you! Your solution fits perfect!

    I allready added a few things, and everything looks very good!

    If you need to know, how to add the taxonomy to each searchresult, wich they are assigned to, just let me know. I could post my solution here!

    Greats and once more, Thank you!

    Trevor
    #55025

    Anything that you can post that helps this community, feel free to. Post all code inside code tags (backticks). I will leave this thread open for a bit longer to allow this.

    Anonymous
    #55029
     <?php $sep = " "; ?>
     <?php $terms = get_the_terms( $post->ID , 'sparte' );
     if ( $terms != null ){
     foreach( $terms as $term ) {
    print $sep;
     print $term->name;
     //unset($term);
    } }
    ?>

    <?php $sep = " "; ?>
    Sets the seperator seeting!

    Sparte is my custom taxonomy!
    Just change this to your taxonomy.

    Hope it helps!

    Greats

Viewing 10 posts – 31 through 40 (of 41 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.