Buenas tardes / noches / días gente de foro beta, estoy peleando con un código que no quiere quedar tal como quiero que quede.
He bajado la plantilla "Adapt " de
Enlace eliminado y lo he modificado tanto que ya no vale la pena cambiar a estas alturas.
En la sección de "Recent News" esta el código siguiente, pero quisiera que solo se muestre una categoría determinada.
http://forobeta.com/wordpress/17506-ultimos-post-de-2-categorias-index.html
he buscado por el foro y esto me ha funcionado en partes.
Saludos
Insertar CODE, HTML o PHP:
<?php
//get post type ==> regular posts
global $post;
$args = array(
'post_type' =>'post',
'numberposts' => '4'
);
$blog_posts = get_posts($args);
?>
<?php if($blog_posts) { ?>
<section id="home-posts" class="clearfix">
<h2 class="heading"><span><?php if(!empty($options['recent_work_text'])) { echo $options['recent_news_text']; } else { _e('Recent News','adapt'); }?></span></h2>
<?php
$count=0;
foreach($blog_posts as $post) : setup_postdata($post);
$count++;
//get portfolio thumbnail
$feat_img = wp_get_attachment_image_src(get_post_thumbnail_id(), 'grid-thumb');
?>
<article class="home-entry <?php if($count == '4') { echo 'remove-margin'; } if($count == '3') { echo ' responsive-clear'; } ?>">
<?php if ($feat_img) { ?>
<a rel="nofollow" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo $feat_img[0]; ?>" height="<?php echo $feat_img[2]; ?>" width="<?php echo $feat_img[1]; ?>" alt="<?php echo the_title(); ?>" /></a>
<?php } ?>
<div class="home-entry-description">
<h3><a rel="nofollow" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php echo the_title(); ?></a></h3>
<?php echo excerpt('15'); ?>
</div>
<!-- /home-entry-description -->
</article>
<!-- /home-entry-->
<?php
if($count == '4') { echo '<div class="clear"></div>'; $count=0; }
endforeach; ?>
</section>
<!-- /home-posts -->
<?php } ?>