Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

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

Viewing 10 posts - 1 through 10 (of 41 total)
  • Johannes Otto-Lübker
    #53355

    Hey trevor,

    I want to customize the result.php to get another look on the search results.
    I just want have a table wich sets the document picture to the left an the text of the document to the right.
    Header and Site forward and Resultcount can stay like that.

    Could you help me out?
    Site: http://versicherungsbedingungen-online.de/suchseite/
    Here´s the code:

    <?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() )
    {
    	?>
    	
    	<?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>
    	
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
    		<div>
    			<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    			
    			<p><br /><?php the_excerpt(); ?><p>
    <?php
      if ( has_post_thumbnail() ) {
        echo '<a href="';
        the_permalink();
        echo '">';
        the_post_thumbnail("small");
        echo '</a>';
      }
    ?>
    			<p><?php the_category(); ?><p>
    			<p><?php the_tags(); ?><p>
    			<p><small><?php the_date(); ?></small><p>
    			
    		</div>
    		
    		<hr />
    		<?php
    	}
    	?>
    	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>
    	<?php
    }
    else
    {
    	echo "No Results Found";
    }
    ?>
    Trevor Moderator
    #53364

    Can you make a fake screenshot of what it should look like. BTW, the term ‘table’ has a very specific meaning in web design and HTML and can be misleading. What you probably want is a two column solution, not a table (tables are not responsive and should be avoided except to display purely numerical/tabular data.

    If the theme has any example post display that shows this, this would be very useful, as then we can grab the css and html structure they use.

    Johannes Otto-Lübker
    #53370
    This reply has been marked as private.
    Johannes Otto-Lübker
    #53371
    This reply has been marked as private.
    Trevor Moderator
    #53372

    OK, so title still on top, but then under to the left is the image and to the right is the text. Maybe split 33%/67% ?

    Johannes Otto-Lübker
    #53374

    sounds good! Image don´t have to be that big.

    Trevor Moderator
    #53377

    Ah, OK.

    Johannes Otto-Lübker
    #53406
    This reply has been marked as private.
    Trevor Moderator
    #53418

    There is no ‘easy fix’ code. It has to be hand coded. Without a sample from the theme, it is hard to do. Look at the code yourself and see if you can add in the right bits.

    Johannes Otto-Lübker
    #53433

    Where can i find the html of Search and filter and how to edit the data?
    As long as i know, the php file is not the right one to set columns…

Viewing 10 posts - 1 through 10 (of 41 total)

The topic ‘Customize result.php with table’ is closed to new replies.