<?php $words = 25; ?>
<div id="featured">
<ul id="featured-nav">
<li class="theShow"><a class="theShow tab">Upcoming Show</a></li><li class="featuredBusiness"><a class="featuredBusiness tab">Around Town</a></li></ul>
<div class="theShow featuredStuff">
<?php $i = 1; ?>
<?php
query_posts('cat=4&order=DESC');?>
<?php $theShow_PostCount = $wp_query->post_count;?>
<script language="javascript">
var theShowCount = "<?php echo($theShow_PostCount);?>"
</script>
<?php while (have_posts()): the_post(); ?>
<div class="<?php echo 'theShow' . $i; ?> inActive">
<?php
//Get images attached to the post
$args = array(
'post_type' => 'attachment',
'post_mime_type' => 'image',
'numberposts' => -1,
'order' => 'ASC',
'post_status' => null,
'post_parent' => $post->ID
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
$imgurl = wp_get_attachment_thumb_url( $attachment->ID );
break;
}
//Display image
}
//Get Image information
$imgsrc = get_post_meta($post->ID, 'Image', true);
$size = 100;?>
<a href="<?php the_permalink(); ?>"><img src="<?php echo $imgurl; ?>" id="featured-pic" /></a>
<div id="featured-content">
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<h2><?php echo get_post_meta($post->ID, 'featuredSubTitle', true); ?> </h2>
<?php echo excerpt($words); ?><a href="<?php the_permalink(); ?>">[more...]</a>
</div>
</div>
<?php $i++; ?>
<?php endwhile; ?>
<?php wp_reset_query(); ?>
</div>
<div class="featuredBusiness featuredStuff">
<?php $i = 1; ?>
<?php
query_posts('cat=25&orderDESC');?>
<?php $featuredBusiness_PostCount = $wp_query->post_count;?>
<script language="javascript">
var featuredBusinessCount = "<?php echo($featuredBusiness_PostCount);?>"
</script>
<?php while (have_posts()): the_post(); ?>
<div class="<?php echo 'featuredBusiness' . $i; ?> inActive">
<?php
//Get images attached to the post
$args = array(
'post_type' => 'attachment',
'post_mime_type' => 'image',
'numberposts' => -1,
'order' => 'ASC',
'post_status' => null,
'post_parent' => $post->ID
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
$imgurl = wp_get_attachment_thumb_url( $attachment->ID );
break;
}
//Display image
}
//Get Image information
$imgsrc = get_post_meta($post->ID, 'Image', true);
$size = 100;?>
<a href="<?php the_permalink(); ?>"><img src="<?php echo $imgurl; ?>" id="featured-pic" /></a>
<div id="featured-content">
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<h2><?php echo get_post_meta($post->ID, 'featuredSubTitle', true); ?> </h2>
<?php echo excerpt($words); ?><a href="<?php the_permalink(); ?>">[more...]</a>
</div>
</div>
<?php $i++; ?>
<?php endwhile; ?>
</div>