Boas pessoal, eu tenho um blog desenvolvido em wordpress, e queria que apenas os "posts" de uma certa categoria fossem apresentados na pagina inicial, alguém sabe como isso se faz?
Aqui fica o código do index.php
<?php get_header('home'); ?>
<?php $layout = get_option('dancefloor_theme_options_layout'); $theme_layout = $layout['design']; if (!$theme_layout) $theme_layout = "left";?>
<?php get_template_part( 'slider' ); ?>
<div class="container">
<?php if ( ! dynamic_sidebar( 'Home Gallery' )) : ?>
<br/>
<?php endif; ?>
<?php if ( ! dynamic_sidebar( 'Home Widget Left' )) : ?>
<?php endif; ?>
<?php if ( ! dynamic_sidebar( 'Home Widget Center' )) : ?>
<?php endif; ?>
<?php if ( ! dynamic_sidebar( 'Home Widget Right' )) : ?>
<?php endif; ?>
<div class="contents-<?php echo $theme_layout ?>">
<!-- calendar -->
<?php $exclude = get_cat_ID('featured-video');
$query = new WP_Query(array( 'cat' => '-'.$exclude,'paged' => $paged, 'post_type' => array( 'post', 'featured', 'events' ) )); if ( $query->have_posts() ): while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="post-wrapper">
<h2 class="title"><a href="<?php the_permalink() ?>"><?php the_title();?></a></h2>
<div class="post-container">
<h4 class="post-date"><?php the_time('M'); ?><span><?php the_time('j'); ?></span></h4>
<?php
$video_source = get_post_meta($post->ID, 'video_meta_box_source', true);
$video_id = get_post_meta($post->ID, 'video_meta_box_videoid', true);
if(($video_source == "vimeo") && !empty($video_id)){ ?>
<div class="video"><iframe src="http://player.vimeo.com/video/<?php echo $video_id; ?>?title=0&portrait=0&color=e275c7" width="554" height="300" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe></div>
<?php } elseif(( $video_source == "youtube") && !empty($video_id)){ ?>
<div class="video"><iframe width="554" height="342" src="http://www.youtube.com/embed/<?php echo $video_id; ?>" frameborder="0" allowfullscreen></iframe></div>
<?php } ?>
<div class="post-thumb-container">
<a href="<?php the_permalink(); ?>">
<?php gorilla_img('home_thumb');?>
</a>
</div>
<div class="post-data">
<?php
the_excerpt();
?>
<div class="btn-wrapper">
<a class="read-more-btn" href="<?php the_permalink() ?>"><?php _e('Ler Mais','language');?></a>
<p><?php the_tags('Posted in: ', ', ', ' '); ?></p>
</div>
</div>
</div>
</div><!-- post wrapper closed -->
<?php endwhile; else: ?>
<div class="post-wrapper">
<div class="post-container">
<div class="post-data">
<h2><?php _e('No Results Found.','language');?></h2>
</div>
</div>
</div><!-- post wrapper closed -->
<?php endif; ?>
<?php theme_pagination( $query->max_num_pages); ?>
</div><!-- content closed -->
<?php get_sidebar('home'); ?>
</div><!-- container closed -->
<?php get_footer(); ?>
Obrigado
Cumps