Hi people,
here's my situation... i got a template with 2 blocks for displaying posts on the home page :
1) one to display "Featured Posts" with thumbnails (setup by custom fields)
2) the orther one for showing "Recent Posts"
My problem is: i don't want the posts in "Featured" to appear in "Recents"
Below, you'll find the 2 blocks of codes used (first one is for featured and the second one for recent)
<?php
if (function_exists(getFeaturedPost)){
$lpi = getFeaturedPost();
for($fpid=0; $fpid<=4; $fpid++){
if ($lpi[$fpid]){
?>
<div class="featnewsframe">
<div class="featpic">
<?php
$img = $lpi[$fpid]["image"];
?>
" title="<?php echo $lpi[$fpid]["longtitle"] ?>"><img src="<?php echo $img;?>" alt="<?php echo $lpi[$fpid]["longtitle"] ?>"/>
</div>
<div class="featdes">
<h2 class="feattitle">" title="<?php echo $lpi[$fpid]["longtitle"] ?>"><?php echo $lpi[$fpid]["title"] ?></h2>
<div class="featshortdes">
<?php echo $lpi[$fpid]["description"] ?>...
</div>
<div class="featnewsdate">
<?php
$arc_year = get_the_time('Y');
$arc_month = get_the_time('m');
$arc_day = get_the_time('d');
?>
"><?php the_time('F d, Y'); ?>
</div>
</div>
<div class="clear"></div>
<div class="featnewsreadmore">" title="<?php echo $lpi[$fpid]["longtitle"] ?>">Read more!</div>
</div>
<?php
}
}
}
?>
<?php $i=1;while (have_posts()) : the_post(); ?><div class="recentframe">
<div class="recentpic">
<?php
$image = get_post_custom_values("featured_image");
if (is_array($image) && $image[0]!=""){
$img = $image[0];
}else{
$img = get_bloginfo('template_directory') . "/images/default2.gif";
}
?>
" title="<?php the_title(); ?>"><img src="<?php echo $img;?>" alt="<?php the_title(); ?>"/>
</div>
<div class="recentdes">
<div class="recentdate">
<?php
$arc_year = get_the_time('Y');
$arc_month = get_the_time('m');
$arc_day = get_the_time('d');
?>
"><?php the_time('F d, Y'); ?>
</div>
<h2 class="recenttitle">" title="<?php the_title(); ?>"><?php the_short_title(40); ?></h2>
<div class="recentshortdes">
<?php strip_tags(the_excerpt_main(70,'','none',true,''),"
<p><b>"); ?>
</div>
<!--div class="readabout"><?php the_tags('Readmore About: ', ', ', ''); ?></div-->
<div class="recentreadmore">" title="<?php the_title(); ?>">Readmore</div>
</div>
<div class="clear"></div>
</div>
<?php if($i==2){ ?>
<div class="recentframe3">
<img src="images/sal.jpg" alt="SAL" />
</div>
<?php } $i++; endwhile; ?>
<?php wp_pagenavi(); ?>
`