Ankit,
Thanks so much for the support. I can’t tell you how much you are helping!
I am still receiving an error “Undefined index: attatchment_id”. I apologize for my ignorance.
Here is the whole block of code I am working with.
<div class="post-image-box entry-image">
<?php $attachments = get_children( array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image') );
if ( $attachments ) { ?>
<?php
/* add javascript */
wp_enqueue_script( 'agurghis-flexslider' );
?>
<?php if ($current==0) { ?>
<script type='text/javascript'>
jQuery(function() {
jQuery('#post-<?php the_ID(); ?> .flexslider').flexslider( {
slideshowSpeed: 4200,
animationSpeed: 500,
});
});
</script>
<?php } elseif ($current==1) { ?>
<script type='text/javascript'>
jQuery(function() {
jQuery('#post-<?php the_ID(); ?> .flexslider').flexslider( {
slideshowSpeed: 2900,
animationSpeed: 200,
});
});
</script>
<?php } elseif ($current==2) { ?>
<script type='text/javascript'>
jQuery(function() {
jQuery('post-<?php the_ID(); ?> .flexslider').flexslider( {
slideshowSpeed: 5600,
animationSpeed: 200,
});
});
</script>
<?php } elseif ($current==3) { ?>
<script type='text/javascript'>
jQuery(function() {
jQuery('#post-<?php the_ID(); ?> .flexslider').flexslider( {
slideshowSpeed: 4800,
animationSpeed: 300,
});
});
</script>
<?php } elseif ($current==4) { ?>
<script type='text/javascript'>
jQuery(function() {
jQuery('#post-<?php the_ID(); ?> .flexslider').flexslider( {
slideshowSpeed: 3400,
animationSpeed: 150,
});
});
</script>
<?php } ?>
<div class="flexslider">
<ul class="slides">
<?php
$attachments = get_children(array('post_parent' => $post->ID,
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'ASC',
'orderby' => 'menu_order ID'));
foreach($attachments as $att_id => $attachment) {
$medium_img_urls = wp_get_attachment_image_src( $attachment->ID, 'featured_list_image' );
?>
<li>
<a class="gall-img" href="<?php the_permalink() ?>" style="margin-bottom: 0;">
<img src="<?php echo $medium_img_urls[0]; ?>" alt="<?php echo $attachment->post_title; ?>" />
</a>
</li>
<?php
}
?>
</ul>
</div>
<?php } else { ?>
<a class="gall-img entry-image" href="<?php the_permalink() ?>" style="margin-bottom: 0;">
<?php the_post_thumbnail('featured_list_image'); ?>
</a>
<?php } ?>
</div>
Thanks again,