Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 88 lines (71 sloc) 2.946 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
<?php
/*
Template Name: Media Library
*/

get_header(); ?>

<section id="content-main" class="main">

<h1 class="section-title"><?php _e('Media Library','mozpress'); ?></h1>

<?php if (have_posts()) : ?>

<?php if ( has_nav_menu('media_tabs') ) :
  wp_nav_menu( array(
    'menu' => 'Media Library',
    'container' => 'nav',
    'container_class' => 'nav-tabs',
    'theme_location' => 'media_tabs',
    'fallback_cb' => false)
    );
endif; ?>

<?php while (have_posts()) : the_post(); ?>
<article class="media-page entry-content">
<?php edit_post_link( __( 'Edit Page', 'onemozilla' ), '<p class="edit">', '</p>' ); ?>
<?php the_content(); ?>
<?php if (is_page(get_page_by_path('media-library/bios')->ID)) : ?>
<?php $bios = new WP_Query('post_type=bios&status=published&paged=0&orderby=menu_order&order=ASC');
      if ($bios->have_posts()) : ?>
<ul class="gallery headshots">
<?php while ($bios->have_posts()) : $bios->the_post(); ?>
<?php
      $position = get_post_meta($bios->post->ID, 'bio_position', true);
      $name = get_the_title();
      if (has_post_thumbnail()) :
        $headshot = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
      endif;
    ?>
<li class="vcard">
<figure class="headshot">
<a href="<?php echo $headshot[0]; ?>" class="photo" title="<?php _e('Download high resolution image of ','mozpress'); esc_attr(the_title()); ?>"><?php the_post_thumbnail('thumbnail', array('alt' => "", 'title' => "")); ?></a>
<figcaption>
<strong class="fn"><?php esc_attr(the_title()); ?></strong>
<?php if ($position) : ?><span class="title"><?php echo esc_attr($position); ?></span><?php endif; ?>
<a href="<?php the_permalink(); ?>" class="more"><?php _e('See bio','mozpress'); ?></a>
</figcaption>
</figure>
</li>
<?php endwhile; ?>
</ul>
<?php endif; wp_reset_query(); ?>
<?php endif; ?>

<?php wp_link_pages(array('before' => '<p class="pages"><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number', 'link_before' => '<b>', 'link_after' => '</b>')); ?>
</article>
<?php endwhile; endif; ?>

</section>

<?php get_sidebar(); ?>

<?php if (is_page(get_page_by_path('media-library')->ID)) : ?>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/TabInterface.js"></script>
<script type="text/javascript">
// <![CDATA[
jQuery(document).ready(function(){
var cabinets = Array();
var collection = document.getElementsByTagName( '*' );
var cLen = collection.length;
for( var i=0; i<cLen; i++ ){
if( collection[i] &&
/\s*tabbed\s*/.test( collection[i].className ) ){
cabinets.push( new TabInterface( collection[i], i ) );
}
}
});
// ]]>
</script>
<?php endif; ?>


<?php get_footer(); ?>
Something went wrong with that request. Please try again.