Home › Forum › Plugin e temi di WP › Inserire in home solo gli articoli di una o più categorie
-
AutorePost
-
-
23 Marzo 2011 alle 13:54 #17281cordianiPartecipante
Vorrei inserire in home solo gli articoli di alcune categorie (e non di tutte)
non ho idea di come si faccia, se esiste un plugin che lo consenta.
Posto default.php se qualcuno sa dove e come posso intervenire per far quello che mi serve… ve ne sarei grato!!!!
<div id="main-area-wrap">
<!-- Recent From Category Posts -->
<div id="recentposts">
<div class="recent first">
<?php recent_from(get_option('enews_recent_cat1')); ?>
</div> <!-- end recent post -->
<div class="recent">
<?php recent_from(get_option('enews_recent_cat2')); ?>
</div> <!-- end recent post -->
<div class="recent">
<?php recent_from(get_option('enews_recent_cat3')); ?>
</div> <!-- end recent post -->
</div>
<!-- end Recent From Category Posts -->
<div id="wrapper">
<div id="main">
<?php $i = 0;
if (get_option('enews_duplicate') == 'No') {
$args=array(
'showposts'=>get_option('enews_homepage_posts'),
'post__not_in' => $ids,
'paged'=>$paged,
);
} else {
$args=array(
'showposts'=>get_option('enews_homepage_posts'),
'paged'=>$paged,
);
};
query_posts($args);
while (have_posts()) : the_post();
$i++;
if (get_option('enews_grab_image') == 'Enable') { $thumb = catch_that_image(); }
else { $thumb = get_post_meta($post->ID, 'Thumbnail', $single = true); }
if ($i<=4) { ?>
<div class="mainpost-wrap<?php if (($i%2)<>0) echo (" fst") ?>">
<h2>" title="Permanent Link to <?php the_title(); ?>"><?php the_title2('', '...', true, '37'); ?></h2>
<p><?php truncate_post(119); ?></p>
<div class="info">creato il: <?php the_time(get_option('enews_date_format')) ?> | autore: <?php echo get_the_author(); ?></div>
</div> <!-- end mainpost-wrap-->
<?php } else { ?>
<div class="new-post">
<h2>" title="Permanent Link to <?php the_title(); ?>"><?php the_title2('', '...', true, '45'); ?></h2>
<p class="info">posted on: <?php the_time(get_option('enews_date_format')) ?> | author: <?php echo get_the_author(); ?></p>
<p><?php truncate_post(150); ?></p>
</div> <!-- end new-post -->
<?php }; ?>
<?php endwhile; wp_reset_query(); ?>
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
else { ?>
<p class="pagination">
<?php next_posts_link('« Previous Entries') ?>
<?php previous_posts_link('Next Entries »') ?>
</p>
<?php } ?>
</div> <!-- end main -->
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.