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 Please help to fix the error

Viewing 2 posts - 1 through 2 (of 2 total)
  • Vyacheslav Pavlov
    #133001

    Hi!

    <?php
    	if ( $query->have_posts() )
    	{
    ?>
    
    		<div style="width: 100%;">Найдено <?php echo $query->found_posts; ?> Результатов<br />
    			<div class="pagination">
    				<div class="nav-previous"><?php next_posts_link( 'Еще результаты', $query->max_num_pages ); ?></div>
    				<div class="nav-next"><?php previous_posts_link( 'Прошлые результаты' ); ?></div>
    			</div>
    		</div>
    	
    		<?php
    		$column_count = 0;
    			while ($query->have_posts())
    			{
    				$query->the_post();
    			?>
    
    				<div class="one_third" style="margin-right: 0px;">									
    					<?php if ( has_post_thumbnail()) { ?>
    					<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
    					<?php the_post_thumbnail(); ?></a><?php } ?>
    				<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
    				</div>
    
    		<?php
    			$column_count ++; 			
    		 ?>
    		}
    	}	
    
    	<?php 
    		else {echo "Ничего не найдено";} 
    	?>

    Parse error: syntax error, unexpected ‘else’ (T_ELSE) in /home/sobaka-pav/dk-moskvor.ru/docs/wp-content/themes/Divi/search-filter/results.php on line 33

    Trevor Moderator
    #133121

    Is this better:

    <?php
    	if ( $query->have_posts() )
    	{
    ?>
    
    		<div style="width: 100%;">Найдено <?php echo $query->found_posts; ?> Результатов<br />
    			<div class="pagination">
    				<div class="nav-previous"><?php next_posts_link( 'Еще результаты', $query->max_num_pages ); ?></div>
    				<div class="nav-next"><?php previous_posts_link( 'Прошлые результаты' ); ?></div>
    			</div>
    		</div>
    	
    		<?php
    		$column_count = 0;
    			while ($query->have_posts())
    			{
    				$query->the_post();
    			?>
    
    				<div class="one_third" style="margin-right: 0px;">									
    					<?php if ( has_post_thumbnail()) { ?>
    					<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
    					<?php the_post_thumbnail(); ?></a><?php } ?>
    				<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
    				</div>
    
    		<?php
    			$column_count ++; 			
    		}
    	}	
    
    		else {echo "Ничего не найдено";} 
    	?>
Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘Search & Filter Pro’ is closed to new topics and replies.