';
if ( $arixwp_featured_display == 'four' || $arixwp_featured_display == 'one' ) {
if ( $count >= 1 ) {
if ( $arixwp_featured_main ) {
$arixwp_featured1 = new WP_Query( 'p=' . $arixwp_featured_main . '&showposts=1' );
} else {
$arixwp_featured1 = new WP_Query( 'category_name=' . $arixwp_featured_category . '&showposts=1' );
}
while ( $arixwp_featured1->have_posts() ) {
$arixwp_featured1->the_post();
if ( has_post_thumbnail( $arixwp_featured1->post->ID ) ) {
$args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID );
$attachments = get_posts( $args );
if ($attachments) {
foreach ( $attachments as $attachment ) {
$featured_id = get_post_thumbnail_id( $arixwp_featured1->post->ID );
if ( $attachment->ID == $featured_id ) {
if ( is_multisite() ) {
global $blog_id;
$string = '/files';
$replace = '/wp-content/blogs.dir/' . $blog_id . '/files';
$thumbnailsrc = str_replace( $string, $replace, $attachment->guid );
} else {
$thumbnailsrc = $attachment->guid;
}
}
}
}
$thumbnail = get_template_directory_uri() . '/libs/resizurr.php?m=' . $arixwp_featured_main_scale . '&a=' . $arixwp_featured_main_crop . '&w=' . $arixwp_featured_main_width . '&h=' . $arixwp_featured_main_height . '&q=100&src=' . $thumbnailsrc;
} else {
$thumbnail = get_template_directory_uri() . '/images/captionbg.png';
}
$excerpt = limit_chars( get_the_excerpt(), 75 );
echo '
';
}
}
}
if ( $arixwp_featured_display == 'four' || $arixwp_featured_display == 'three' ) {
if ( $count >= 4 ) {
if ( $arixwp_featured_display == 'three' ) {
$offset = 0;
$show = 3;
} else {
$offset = 1;
$show = 3;
}
$arixwp_featured2 = new WP_Query( 'category_name=' . $arixwp_featured_category . '&showposts=' . $show . '&offset=' . $offset );
$i = 0;
echo '
';
while ( $arixwp_featured2->have_posts() ) {
$arixwp_featured2->the_post();
if ( has_post_thumbnail( $arixwp_featured2->post->ID ) ) {
$args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID );
$attachments = get_posts( $args );
if ($attachments) {
foreach ( $attachments as $attachment ) {
$featured_id = get_post_thumbnail_id( $arixwp_featured2->post->ID );
if ( $attachment->ID == $featured_id ) {
if ( is_multisite() ) {
global $blog_id;
$string = '/files';
$replace = '/wp-content/blogs.dir/' . $blog_id . '/files';
$thumbnailsrc = str_replace( $string, $replace, $attachment->guid );
} else {
$thumbnailsrc = $attachment->guid;
}
}
}
}
$thumbnail2 = get_template_directory_uri() . '/libs/resizurr.php?m=' . $arixwp_featured_small_scale . '&a=' . $arixwp_featured_small_crop . '&w=' . $arixwp_featured_small_width . '&h=' . $arixwp_featured_small_height . '&q=100&src=' . $thumbnailsrc;
} else {
$thumbnail2 = get_template_directory_uri() . '/images/captionbg.png';
}
$excerpt = limit_chars( get_the_excerpt(), 55 );
if ( $i == 0 ) {
$class = 'class="first"';
} else {
$class = '';
}
echo '
';
$i++;
}
echo '
';
}
}
// Show a slider if option selected.
if ( $arixwp_featured_display == 'slide' ) {
$arixwp_featured3 = new WP_Query( 'category_name=' . $arixwp_featured_category . '&showposts=4' );
echo '
';
while ( $arixwp_featured3->have_posts() ) {
$arixwp_featured3->the_post();
if ( has_post_thumbnail( $arixwp_featured3->post->ID ) ) {
$args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID );
$attachments = get_posts( $args );
if ($attachments) {
foreach ( $attachments as $attachment ) {
$featured_id = get_post_thumbnail_id( $arixwp_featured3->post->ID );
if ( $attachment->ID == $featured_id ) {
if ( is_multisite() ) {
global $blog_id;
$string = '/files';
$replace = '/wp-content/blogs.dir/' . $blog_id . '/files';
$thumbnailsrc = str_replace( $string, $replace, $attachment->guid );
} else {
$thumbnailsrc = $attachment->guid;
}
}
}
}
$thumbnail = get_template_directory_uri() . '/libs/resizurr.php?m=' . $arixwp_featured_main_scale . '&a=' . $arixwp_featured_main_crop . '&w=' . $arixwp_featured_main_width . '&h=' . $arixwp_featured_main_height . '&q=100&src=' . $thumbnailsrc;
} else {
$thumbnail = get_template_directory_uri() . '/images/captionbg.png';
}
$excerpt = limit_chars( get_the_excerpt(), 75 );
echo '
-
';
}
echo '
' . "\n";
echo '
' . "\n";
echo '
' . "\n";
?>