Advertisement
designbymerovingi

myCRED Rank Archive Template

Jun 21st, 2013
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.32 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Custom Archive Template for myCRED Ranks
  4.  * Based on the TwentyTwelve archive.php and content.php files.
  5.  *
  6.  * See http://mycred.me/support/tutorials/creating-rank-…for-your-theme/
  7.  * for details on the present_users_of_rank() function.
  8.  *
  9.  * @version 1.0
  10.  */
  11. get_header(); ?>
  12.  
  13.     <section id="primary" class="site-content">
  14.         <div id="content" role="main">
  15.  
  16.         <?php if ( have_posts() ) : ?>
  17.             <header class="archive-header rank-archive-header">
  18.                 <h1 class="archive-title rank-archive-title">Ranks</h1>
  19.             </header><!-- .archive-header -->
  20.  
  21.             <?php
  22.             /* Start the Loop */
  23.             while ( have_posts() ) : the_post(); ?>
  24.  
  25.             <article id="rank-<?php the_ID(); ?>" <?php post_class(); ?>>
  26.                 <header class="entry-header rank-header">
  27.                     <?php the_post_thumbnail(); ?>
  28.                     <h1 class="entry-title rank-title"><?php the_title(); ?></h1>
  29.                 </header><!-- .entry-header -->
  30.                 <div class="entry-content rank-members">
  31.                     <?php present_users_of_rank( get_the_ID() ); ?>
  32.  
  33.                 </div><!-- .entry-content -->
  34.             </article><!-- #rank -->
  35.    
  36.             <?php endwhile;
  37.  
  38.             twentytwelve_content_nav( 'nav-below' ); ?>
  39.  
  40.         <?php else : ?>
  41.             <?php get_template_part( 'content', 'none' ); ?>
  42.         <?php endif; ?>
  43.  
  44.         </div><!-- #content -->
  45.     </section><!-- #primary -->
  46.  
  47. <?php get_sidebar(); ?>
  48. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement