Hat keiner eine Idee ? So sieht die popular-posts.php Datei aus
PHP
<?php
// get the settings from the theme options.
$heading = ft_get_option('popular_posts_heading');
$popular_posts_type = ft_get_option('popular_posts_type');
$post_num = ft_get_option('popular_posts_num');
$post_thumb = ( ft_get_option('popular_posts_thumb') == 'on' ? true : false );
$post_meta = ( ft_get_option('popular_posts_meta') == 'on' ? true : false );
$post_excerpt = ( ft_get_option('popular_posts_excerpt') == 'on' ? true : false );
$post_excerpt_l = ft_get_option('popular_posts_excerpt_lenght');
$sort_query = ($popular_posts_type == 'views') ? '&v_sortby=views' : 'orderby=comment_count';
// set the post query.
$query = "post_type=post&posts_per_page=$post_num$sort_query";
// if is a category page let's filter the post by a category.
if ( is_category() && get_query_var('cat') )
$query = $query . "&cat=$cat";
query_posts($query);
?>
<?php $i = 0; if ( have_posts() ) : ?>
<section id="popular-posts" class="clearfix">
<?php if ( is_category() && get_query_var('cat') ) : ?>
<h3 class="heading"><span><?php printf(__('%1$s in "%2$s"', THEME_FX), $heading, single_cat_title( '', false )); ?></span></h3>
<?php else : ?>
<h3 class="heading"><span><?php echo $heading; ?></span></h3>
<?php endif; ?>
<div class="row20">
<?php while ( have_posts() ) : the_post(); $i++; ?>
<div class="grid one-third">
<?php
freshthemes_print_loop(
array(
'class' => 'entry-grid clearfix',
'thumb' => $post_thumb,
'thumb_size' => '619x450',
'meta' => $post_meta,
'excerpt' => $post_excerpt,
'excerpt_type' => 'custom',
'excerpt_lenght' => $post_excerpt_l,
'cats' => false
)
);
?>
</div>
<?php echo ( $i % 3 == 0 ? '<div class="clear"></div>' : '' ); ?>
<?php endwhile; ?>
</div>
</section>
<?php endif; ?>
<?php wp_reset_query(); ?>
Alles anzeigen