<?php
$format = get_post_format($post->ID);
if($format == '') $format = 'standard';
$format_link = get_post_format_link($format);
if($format=='standard')
$format_link = get_permalink();
if($format!='standard')
$all_format_title = 'title="View all '.$format.' posts"';
else $all_format_title = 'title="Read the full article"';
?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<?php if(get_option('mp_post_format_icons')!='true'): ?>
<a href="<?php echo $format_link; ?>" class="post-format-icon <?php echo $format; ?>" <?php echo $all_format_title; ?>></a>
<?php endif; ?>
<?php
$tags = get_the_tag_list('<span class="blog-link first" style="margin-bottom:15px"><span class="icon tags"></span>Tags: ',', ','</span>');
?>
<?php
if ( has_post_format( 'aside' )) {
musicpro_get_post_links();
the_content(); echo $tags;
if(get_option('mp_sharebuttons_post_page')==true):
mp_shareButtons(get_permalink($post->ID) , get_the_title($post->ID), false );
endif;
}
elseif ( has_post_format( 'link' )) {
if(get_post_meta($post->ID, '_format_link_url', true)!=''){
$link = get_post_meta($post->ID, '_format_link_url', true);
}else{
$link = '';
}
?>
<h2 class="entry-title">
<a href="<?php echo $link; ?>" title="Follow this link">
[link] <?php the_title(); ?>
</a>
</h2>
<p>
<span class="cite"><?php echo $link; ?></span>
</p>
<?php musicpro_get_post_links(); ?>
<?php the_excerpt(); echo $tags;
if(get_option('mp_sharebuttons_post_page')==true):
mp_shareButtons(get_permalink($post->ID) , get_the_title($post->ID), false );
endif;
}
elseif ( has_post_format( 'quote' )) {
?><h2 class="entry-title"><a title="Read the full article" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php
musicpro_get_post_links();
?>
<div class="featured-quote">
<blockquote>
<p><?php echo get_post_meta($post->ID, '_format_quote_text', true); ?></p>
<?php if(get_post_meta($post->ID, '_format_quote_source_name', true)!=''): ?>
<small><?php if(get_post_meta($post->ID, '_format_quote_source_url', true)!=''): ?><a href="<?php echo get_post_meta($post->ID, '_format_quote_source_url', true); ?>" target="_blank"><?php endif; ?><?php echo get_post_meta($post->ID, '_format_quote_source_name', true); ?><?php if(get_post_meta($post->ID, '_format_quote_source_url', true)!=''): ?></a><?php endif; ?></small>
<?php endif; ?>
</blockquote>
</div>
<?php the_excerpt(); echo $tags;
if(get_option('mp_sharebuttons_post_page')==true):
mp_shareButtons(get_permalink($post->ID) , get_the_title($post->ID), false );
endif;
}
elseif ( has_post_format( 'audio' )) {
?>
<h2 class="entry-title"><a title="Read the full article" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php
musicpro_get_post_links();
$audio = '[audio mp3='.get_post_meta($post->ID, '_format_audio_mp3', true).' ogg='.get_post_meta($post->ID, '_format_audio_ogg', true).']';
echo do_shortcode($audio);
the_excerpt(); echo $tags;
if(get_option('mp_sharebuttons_post_page')==true):
mp_shareButtons(get_permalink($post->ID) , get_the_title($post->ID), false );
endif;
}
elseif ( has_post_format( 'video' )) {
?>
<h2 class="entry-title"><a title="Read the full article" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php musicpro_get_post_links(); ?>
<div class="mp-video-container frame">
<?php echo get_post_meta($post->ID, '_format_video_embed', true); ?>
</div>
<?php the_excerpt(); echo $tags;
if(get_option('mp_sharebuttons_post_page')==true):
mp_shareButtons(get_permalink($post->ID) , get_the_title($post->ID), false );
endif;
}
elseif ( has_post_format( 'image' )) {
$args = array(
'post_type' => 'attachment',
'numberposts' => -1,
'post_status' => null,
'post_parent' => $post->ID
);
$attachments = get_posts( $args );
?>
<h2 class="entry-title"><a title="Read the full article" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php musicpro_get_post_links(); ?>
<p>
<a href="<?php echo $attachments[0]->guid; ?>" class="preview zoom fancybox">
<?php the_post_thumbnail('post-image') ; ?>
</a>
</p>
<?php the_excerpt(); echo $tags;
if(get_option('mp_sharebuttons_post_page')==true):
mp_shareButtons(get_permalink($post->ID) , get_the_title($post->ID), false );
endif;
}elseif ( has_post_format( 'gallery' )) {
$args = array(
'numberposts' => -1, // Using -1 loads all posts
'orderby' => 'menu_order', // This ensures images are in the order set in the page media manager
'order'=> 'ASC',
'post_mime_type' => 'image', // Make sure it doesn't pull other resources, like videos
'post_parent' => $post->ID, // Important part - ensures the associated images are loaded
'post_status' => null,
'post_type' => 'attachment'
);
$images = get_children( $args );
?>
<script type="text/javascript">
jQuery(function($){
$("#slides<?php the_ID(); ?>").slides({
effect: 'fade',
fadeSpeed: 1000,
crossfade: true,
preload: true,
// preloadImage: 'css/img/ajax-loader.gif',
play: 5000,
pause: 2500,
hoverPause: true,
paginationClass: 'slides-pagination'
});
});
</script>
<h2 class="entry-title"><a title="Read the full article" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php musicpro_get_post_links(); ?>
<?php if($images){ ?>
<div id="slides<?php the_ID(); ?>" class="slides">
<div class="slides_container">
<?php foreach($images as $image){ ?>
<div>
<img src="<?php echo $image->guid; ?>" alt="<?php echo $image->post_title; ?>" title="<?php echo $image->post_title; ?>">
</div>
<?php } ?>
</div>
</div>
<?php }
the_excerpt(); echo $tags;
if(get_option('mp_sharebuttons_post_page')==true):
mp_shareButtons(get_permalink($post->ID) , get_the_title($post->ID), false );
endif;
}
else {
?>
<h2 class="entry-title"><a title="Read the full article" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php
musicpro_get_post_links();
if(has_post_thumbnail( $post->ID )):
?>
<p>
<a href="<?php the_permalink(); ?>" class="preview" title="Read the full article">
<?php the_post_thumbnail() ; ?></a>
</p>
<?php
endif;
the_excerpt();
echo $tags;
if(get_option('mp_sharebuttons_post_page')==true):
mp_shareButtons(get_permalink($post->ID) , get_the_title($post->ID), false );
endif;
}
?>
<?php edit_post_link( __( 'Edit', 'musicpro' ), '<br><span class="edit-link">', '</span>' ); ?>
<div class="separator"></div>
</article>