Forums Forums Search Search Results for 'Sample Results Template'

Viewing 10 results - 101 through 110 (of 119 total)
  • Author
    Search Results
  • #45942

    In reply to: Results not refreshing


    Anonymous
    Inactive

    Hi Trevor,

    thanks to your excellent guidance and explanations.

    The results.php is working now as intended.
    check out: https://www.kleinkunst.theater/

    Pls note that I have translated some words into german.
    (not yet internationalised code, but will add that as well)

    <?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; ?> Beitr&auml;ge gefunden<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( '&Auml;ltere Beitr&auml;ge', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Neuere Beitr&auml;ge' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	</div>
    	<div class="row row-masonry">
    	
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
    	<article <?php post_class('post-masonry col-sm-' . $grid_col); ?>>
    	    <div class="post-inner">
    	        <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
    	            <?php echo at_post_thumbnail($post->ID, 'at_thumbnail', $args); ?>
    	        </a>
    	
    	        <h2>
    	            <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
    	                <?php the_title(); ?>
    	            </a>
    	        </h2>
    	
    	        <p><?php echo the_excerpt(); ?></p>
    	
    	        <div class="clearfix"></div>
    	    </div>
    	</article>
    		
    		<?php
    	}
    	?>
    	</div>
    	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( '&Auml;ltere Beitr&auml;ge', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Neuere Beitr&auml;ge' ); ?></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";
    }
    ?>
    
    #45212

    Anonymous
    Inactive

    No problem – speedy recovery.

    I think the problem lies with the code I have customized here for results.php in SFpro. It seems that maybe my conditional for the second part doesn’t take into consideration the arguments of the query. I end up with all the posts in my db generating equivalent modals. :

    <?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
     *
     */
    
    // $term_list = wp_get_post_terms($post->ID, 'product_features', array("fields" => "all"));
    // foreach($term_list as $term_single) {
    // echo $term_single->slug; //do something here
    // }
    
    if ( $query->have_posts() )
    {
    	?>
    
    	<div class="">
    
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    
    		?>
    
    			<a class="col-md-6 col-lg-4 col-sm-6">
    				<article class="module-container eModal-post-<?php the_ID();?>" href="<?php the_permalink();?>">
    
    				    <h3><?php the_title();?></h3>
    
    				</article>
    			</a>
    
    			<?php
    
    			if( get_field( "demo_module" )) {
    
    			echo do_shortcode( "[modal id='post-". get_the_ID() ."' size='large' title='". get_the_title() ."']".
    
    				 "<div class='col-md-8'>"  . get_the_content() .  "<div class='demo-module'>" . "<a class='cta-button-v4' href='" . get_field( "demo_module" ) . "' target='_blank'>Download Demo Module</a>". "</div>" .  "</div>" . "<div class='col-md-4'>" . do_shortcode("[module_author]") . "</div> <div class='col-md-12'><div class='cta-module'>" . do_shortcode("[cta_module_shortcode]") . "</div></div>" .
    
    				 do_shortcode("[wpdm_package id='". get_the_ID() . "']").  "[/modal]" );
    
    			 } else {
    
    				 echo do_shortcode( "[modal id='post-". get_the_ID() ."' size='large' title='". get_the_title() ."']".
    
    	 				 "<div class='col-md-8'>"  . get_the_content() .   "</div>" . "<div class='col-md-4'>" . do_shortcode("[module_author]") . "</div> <div class='col-md-12'><div class='cta-module'>" . do_shortcode("[cta_module_shortcode]") . "</div></div>" .
    
    	 				 do_shortcode("[wpdm_package id='". get_the_ID() . "']").  "[/modal]" );
    
    			 }
    
    				 ?>
    
    		<?php
    	}
    	?>
    
    	</div>
    
    	<?php
    }
    else
    {
    	echo "No Such Modules";
    }
    ?>
    
    #44951

    Trevor
    Participant

    So, it is relatively simple if you are using the Shortcode Display Results method. See the documentation:

    http://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/

    See how it is using a template called results.php?

    This is that file:

    <?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 />
    	Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
    	
    	<div class="pagination">
    		
    		<div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></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 '<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
    	}
    	?>
    	Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
    	
    	<div class="pagination">
    		
    		<div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></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";
    }
    ?>

    And here is it modified:

    <?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() ) {
    	global $searchandfilter;
    	$sf_current_query = $searchandfilter->get(1526)->current_query();
    	if ($sf_current_query->is_filtered()) {
    		?>
    
    		Found <?php echo $query->found_posts; ?> Results<br/>
    		Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br/>
    
    		<div class="pagination">
    
    			<div class="nav-previous"><?php next_posts_link('Older posts', $query->max_num_pages); ?></div>
    			<div class="nav-next"><?php previous_posts_link('Newer posts'); ?></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 '<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
    		}
    		?>
    		Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br/>
    
    		<div class="pagination">
    
    			<div class="nav-previous"><?php next_posts_link('Older posts', $query->max_num_pages); ?></div>
    			<div class="nav-next"><?php previous_posts_link('Newer posts'); ?></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";
    }
    ?>

    replace 1526 with the id of your search form.

    #42067

    Trevor
    Participant

    There is no results container on the page 🙁

    What did you set for the Enter the filename of the custom template setting on the Display Results tab?

    The method you have chosen will normally go to the theme’s generic search page, and not stay on the page that you are on. The page sample you showed is a single post page? I think that regardless of which display results method you choose, it will send the search to another page, as results must show on an archive (multi-post) page of some sort.


    Anonymous
    Inactive

    I’ve a results.php with

    <?php
    /**
     * Search & Filter Pro 
     *
     * Sample Results Template
     * 
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      http://www.designsandcode.com/
     * @copyright 2014 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
     * 
     * 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
     *
     */
    
    /* ROSS DEV CODE START */
    //var_dump($query->posts);
    
    /* $i = 1;
    foreach($query->posts as $tpost)
    {
    	echo $i." | ".$tpost->post_title;
    	echo "<br />";
    	$i++;
    }
    echo "<hr />";
    $i = 1;
    while ($query->have_posts())
    {
    	$query->the_post();
    	echo $i." | ";
    	the_title();
    	echo "<br />";
    	$i++;
    }
    /* ROSS DEV CODE END */
    		
    
    if ( $query->have_posts() )
    {
    
    	?>
    	
    	<div class="row">
    	<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
    	<div class="filter-results" >
    	<div class="filter-results-page"><?php echo $query->found_posts; ?> Ergebnisse  Seite <?php echo $query->query['paged']; ?> von <?php echo $query->max_num_pages; ?></div>
    	
    	<div class="filter-results-pagination">
    	<?php sf_pagination_prev_next($query->query['paged'], $query->max_num_pages); ?>
    	<?php sf_pagination_numbers($query->query['paged'], $query->max_num_pages, " "); ?>
    
    	</div>
    	</div>
    	</div>
        </div>
        <div class="row">
    
        <?php
        
       
    
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		$post_type = get_post_type( get_the_ID() );
    	
    		?>
    
    	
    		
    		
    			
    			
    			
    				<?php 
    
    				switch ($post_type) {
    				    
    				    case 'wein': 
                            
                            echo '<div class="col-xs-12 col-sm-4 col-md-3 col-lg-3">';
    						echo '<div class="item-'.$post_type.'">'; 
    
    				        $wine_id = get_the_ID();
    				    	$term_list = wp_get_post_terms($wine_id, 'winzer', array("fields" => "names"));
    						$title = get_the_title();
    				        $permalink = get_permalink();
    				        $stock = get_field('wine-stock');
    				        $stock_text = get_field('wine-stock-text');
    				     
    
    				        if (empty($stock_text)) {
    
    				        	$stock_text = "Ausverkauft!";
    				        }
    
    				       if (!empty($stock)) {
    				         echo '<div class="wine-teaser"> <span></span><p>'.$stock_text.'</p></div>';
    				       }
    
    				        $name =  get_field('wine-name');
    				        $img_url =  get_field('wine-detail-image');
    
    				        if (empty($img_url)) {
    				        $img_url = '/wordpress/wp-content/uploads/wine_empty.png';
    				       }
    				        $year =  get_field('wine-detail-year');
    				        $sf =  get_field('wine-detail-soul-faktor');
    				        $size =  get_field('wine-detail-size');
    				        echo '<div class="item-overlay"><div class="overlay-content">'.$sf.'<br>Flasche'.$size.'</div></div>';
    				        echo '<a href="'.$permalink.'" title="'.$title.'">';
    				        //echo '<img src="'.aq_resize( $img_url, '300').'" alt="'.$title.'"></a></div>';
    				        echo '<img src="'.aq_resize( $img_url, '300').'" alt="'.$title.'"></a></div>';
    				        echo '<div class="wine-description"><h2><a href="'.$permalink.'" title="'.$title.'">'.$year.' '.$name.'</a></h2>';
    				        echo '<h3>'.$term_list[0].'</h3></div>';
    				        break;
    				    case 'winzer':
    				    	$grower_id = get_the_ID();
    				    	$term_list_country = wp_get_post_terms($grower_id, 'land', array("fields" => "names"));
    				    	$term_list_region = wp_get_post_terms($grower_id, 'anbaugebiet', array("fields" => "names"));
    				        $img_url =  get_field('winegrower-preview-image');
    				        $logo_url =  get_field('winegrower-logo');
    				        $title = get_the_title();
    				        $permalink = get_permalink();
    				 
    				        $exclusive = get_field('winegrower-exclusive');
    				        if ($exclusive == 1) {
    				        	$addexclusive = ' - Exklusiv bei Wein am Limit';
    				        } else {
    				        	$addexclusive = '';
    				        }
    				        echo '<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">';
    						echo '<div class="item-'.$post_type.'">'; 
    						
    						if (!empty($img_url)) {
    								if (!empty($logo_url)){
    								echo '<div class="logo-overlay"><img src="'.aq_resize( $logo_url, '100').'"></div>';}
    								echo '<a href="'.$permalink.'" title="'.$title.'">';
    						        //echo '<img src="'.aq_resize( $img_url, '600', '290' , true).'" alt="'.$title.'"></a></div>';
    						        echo '<img src="'.aq_resize( $img_url, '600', '290' , true).'" alt="'.$title.'"></a>';
    				        }
    				        echo '</div>';
    
    				        echo '<div class="grower-description"><h2><a href="'.$permalink.'" title="'.$title.'">'.$title.$addexclusive.'</a></h2>';
    				        echo '<h3>'.$term_list_region[0].', '.$term_list_country[0].'</h3></div>';
    				       
    				        break;
    				    
    				}
    
    		
    
    				
    
    				 ?>
    				
    			
    	
    			</div>
    
    		
    		<?php
    	}
    	?>
    
    </div>
    	<div class="row">
    	<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
    	<div class="filter-results" >
    	<div class="filter-results-page"><?php echo $query->found_posts; ?> Ergebnisse  Seite <?php echo $query->query['paged']; ?> von <?php echo $query->max_num_pages; ?></div>
    	
    	<div class="filter-results-pagination">
    	<?php sf_pagination_prev_next($query->query['paged'], $query->max_num_pages); ?>
    	<?php sf_pagination_numbers($query->query['paged'], $query->max_num_pages, " "); ?>
    
    	</div>
    	</div>
    	</div>
        </div>
    	
    	<?php
    }
    else
    {  
    	echo '<div class="filter-results" style="height:38px;"><div class="filter-results-page"><div class="filter-results-pagination"></div></div></div>';
    	echo '<div style="width:100%; text-align:center;min-height:400px;padding-top:100px;">Keine Produkte gefunden.</div>';
    }
    ?>

    which is workin no more after update to S&F 2.0.3 (from 1.4.2) – I’ve rebuild all caches, the site stay just empty. Any ideas on this?

    Best.

    #29915

    Ross
    Keymaster

    Well somewhere in your template I think you are using really old pagination.

    Something like calls to the functions sf_paged_links

    Either way, you can find out exactly what line errors are being created and the lines with your pagination by checking your error logs.

    Then, you need to replace this with the correct usage of WP pagination. As mentioned already in the above link, this can be found in the sample template in search-filter-pro/templates/results.php

    Thanks

    #28060

    Anonymous
    Inactive

    Hi,

    How can I modify this code so that I have 3 columns showing up instead of 1?

    <?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 />
    	Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
    	
    	<div class="pagination">
    		
    		<div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></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 '<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
    	}
    	?>
    	Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
    	
    	<div class="pagination">
    		
    		<div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></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";
    }
    ?>
    #27573

    Anonymous
    Inactive

    Let’s try one time more to explain you the problem.

    Vitrine shortcode is:

    For sample, I have page http://vkplitka.ru/zerkalnaya-plitka/

    Vitrine shortcode is
    [vitrina zerk-plitka 3 420 99 99]

    where zerk-plitka is category or tag of goods.

    Plugin checking, is it category, or tag, then render “vitrina” template. Plugin already have interface for intercepting this call and render file “vitrina.php” from theme folder instead of plugin folder.

    So I trying to implement in template “vitrina.php” in theme instead of vitrine “by default” search form and search results, but ONLY which belongs to this vitrine.

    Because all categories and tags rendered by ONE template vitrina.php, then I should somehow to put this argument to search shortcode FROM file vitrina.php.
    So I see this can be done, if I can put additional “boundary conditions” in your search shortcode.

    Are you understand my requests now? Maybe you need additional clarifying?

    #27302

    Anonymous
    Inactive

    Hi,

    I’ve downloaded and installed the latest update, and everything seems to work, but the problem I previously had persists.

    To clarify, it’s not the <p> tag which is causing a problem, but rather an extra tag which seems to creep in amongst occasional posts, and through the ordering out.

    Here’s the page it’s happening on:
    http://mytheatremates.com/news-reviews-and-features/?sf_paged=2

    (although site is constantly updated, so may need to scroll to older posts to see the problem).

    You’ll see that every ‘even’ div is set to clear: left. But then an extra tag surrounds the 10th or div or later, and doesn’t get closed, which means that the next div is the first in that section, and therefore the numbering is reset – and clear: left doesn’t apply in order anymore.

    Here’s the code of the edited template file we’ve created. We’ve not used tags anywhere, so I can’t see where they’re creeping in.

    Can you advise?

    thanks

    Tim

    TEMPLATE:

    <?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=”pagination”>

    <div class=”nav-previous”><?php next_posts_link( ‘Older posts’, $query->max_num_pages ); ?></div>
    <div class=”nav-next”><?php previous_posts_link( ‘Newer posts’ ); ?></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 class=”search-posts-result <?php the_author(); ?>”>
    ” target=”_blank” class=”search-results-image”>
    <?php
    if ( has_post_thumbnail() ) {
    echo ‘<p>’;
    the_post_thumbnail(“small”);
    echo ‘</p>’;
    }
    ?>
    <h2>” target=”_blank”><?php the_title(); ?></h2>

    <div class=”search-posts-date”><?php the_date(); ?></div>
    <div class=”search-posts-content”><?php content(’30’); ?> ” target=”_blank”><span class=”read-more-link”>Read more…</span></div>

    <div class=”search-posts-author”>from <?php the_author(); ?></div>

    </div>
    <?php
    }
    ?>

    <?php
    }
    else
    {
    echo “No Results Found”;
    }
    ?>

    #24207

    Ross
    Keymaster

    Hi Paul, you can use archive mode, then put in the filename: taxonomy-sermons-category.php but see the notes in the above link about potential issues with archive mode, your template might have a custom query inside which is causing it to ignore the S&F query – so you will have to remove this.

    If you are using results method, then you create results.php in search-filter folder – but you msut also place the results shortcode into a page – the results shortcode then loads the results.php template where the shortcode is displayed – probably your results.php won’t be a full template (with the get_header() etc – see the sample results.php on how to do the loop) – you can get the results shortcode from the S&F edit screen.

    Thanks

Viewing 10 results - 101 through 110 (of 119 total)