Advertisement
Guest User

Author Loop

a guest
Aug 23rd, 2010
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.74 KB | None | 0 0
  1. <div id="maincontent" class="clearfix">
  2.    
  3.         <div class="leftcontent">
  4.        
  5.             <ul id="post-list" class="post-list">
  6.        
  7.             <?php query_posts('orderby=rand'); ?>
  8.        
  9.             <?php query_posts('posts_per_page=1&author_name=author1'); if (have_posts()) : while (have_posts()) : the_post(); ?>
  10.            
  11.             <article id="post-<?php the_ID(); ?>">
  12.            
  13.                 <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a><?php edit_post_link('Edit', ' (', ')'); ?></h2>
  14.                
  15.                 <p class="p-cat">In: <?php the_category('|') ?></p>
  16.                
  17.                 <p class="p-author"><span class="name"><?php the_author_posts_link(); ?></span> <span class="avatar"><?php echo get_avatar( $email, $size = '32' ); ?></span></p>
  18.                
  19.                
  20.                 <small class="p-time">
  21.                 <strong class="day"><?php the_time('j') ?></strong>
  22.                 <strong class="month"><?php the_time('M') ?></strong>
  23.                 <strong class="year"><?php the_time('Y') ?></strong>
  24.                 </small>
  25.    
  26.                 <section class="content">
  27.                     <?php the_content('<p>Read the rest of this page &raquo;</p>'); ?>
  28.                 </section>
  29.                
  30.                 <div class="p-det">
  31.                 <ul>
  32.                     <li class="p-det-com"><?php comments_popup_link('No Comments', '(1) Comment', '(%) Comments'); ?></li>
  33.                     <?php if (function_exists('the_tags')) { ?> <?php the_tags('<li class="p-det-tag">Tags: ', ', ', '</li>'); ?> <?php } ?>
  34.                 </ul>
  35.                 </div>
  36.    
  37.             </article>
  38.            
  39.             <?php endwhile; endif; ?>
  40.            
  41.             <?php rewind_posts(); ?>
  42.        
  43.             <?php query_posts('posts_per_page=1&author_name=author2'); if (have_posts()) : while (have_posts()) : the_post(); ?>
  44.                
  45.             <article id="post-<?php the_ID(); ?>">
  46.            
  47.                 <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a><?php edit_post_link('Edit', ' (', ')'); ?></h2>
  48.                
  49.                 <p class="p-cat">In: <?php the_category('|') ?></p>
  50.                
  51.                 <p class="p-author"><span class="name"><?php the_author_posts_link(); ?></span> <span class="avatar"><?php echo get_avatar( $email, $size = '32' ); ?></span></p>
  52.                
  53.                
  54.                 <small class="p-time">
  55.                 <strong class="day"><?php the_time('j') ?></strong>
  56.                 <strong class="month"><?php the_time('M') ?></strong>
  57.                 <strong class="year"><?php the_time('Y') ?></strong>
  58.                 </small>
  59.    
  60.                 <section class="content">
  61.                     <?php the_content('<p>Read the rest of this page &raquo;</p>'); ?>
  62.                 </section>
  63.                
  64.                 <div class="p-det">
  65.                 <ul>
  66.                     <li class="p-det-com"><?php comments_popup_link('No Comments', '(1) Comment', '(%) Comments'); ?></li>
  67.                     <?php if (function_exists('the_tags')) { ?> <?php the_tags('<li class="p-det-tag">Tags: ', ', ', '</li>'); ?> <?php } ?>
  68.                 </ul>
  69.                 </div>
  70.    
  71.             </article>
  72.            
  73.             <?php endwhile; endif; ?>
  74.            
  75.             <?php rewind_posts(); ?>
  76.            
  77.             <?php query_posts('posts_per_page=1&author_name=author3'); if (have_posts()) : while (have_posts()) : the_post(); ?>
  78.                        
  79.             <article id="post-<?php the_ID(); ?>">
  80.            
  81.                 <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a><?php edit_post_link('Edit', ' (', ')'); ?></h2>
  82.                
  83.                 <p class="p-cat">In: <?php the_category('|') ?></p>
  84.                
  85.                 <p class="p-author"><span class="name"><?php the_author_posts_link(); ?></span> <span class="avatar"><?php echo get_avatar( $email, $size = '32' ); ?></span></p>
  86.                
  87.                
  88.                 <small class="p-time">
  89.                 <strong class="day"><?php the_time('j') ?></strong>
  90.                 <strong class="month"><?php the_time('M') ?></strong>
  91.                 <strong class="year"><?php the_time('Y') ?></strong>
  92.                 </small>
  93.    
  94.                 <section class="content">
  95.                     <?php the_content('<p>Read the rest of this page &raquo;</p>'); ?>
  96.                 </section>
  97.                
  98.                 <div class="p-det">
  99.                 <ul>
  100.                     <li class="p-det-com"><?php comments_popup_link('No Comments', '(1) Comment', '(%) Comments'); ?></li>
  101.                     <?php if (function_exists('the_tags')) { ?> <?php the_tags('<li class="p-det-tag">Tags: ', ', ', '</li>'); ?> <?php } ?>
  102.                 </ul>
  103.                 </div>
  104.    
  105.             </article>
  106.            
  107.             <?php endwhile; endif; ?>
  108.            
  109.             <?php rewind_posts(); ?>
  110.            
  111.             <?php query_posts('posts_per_page=1&author_name=author4'); if (have_posts()) : while (have_posts()) : the_post(); ?>
  112.                                
  113.             <article id="post-<?php the_ID(); ?>">
  114.            
  115.                 <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a><?php edit_post_link('Edit', ' (', ')'); ?></h2>
  116.                
  117.                 <p class="p-cat">In: <?php the_category('|') ?></p>
  118.                
  119.                 <p class="p-author"><span class="name"><?php the_author_posts_link(); ?></span> <span class="avatar"><?php echo get_avatar( $email, $size = '32' ); ?></span></p>
  120.                
  121.                
  122.                 <small class="p-time">
  123.                 <strong class="day"><?php the_time('j') ?></strong>
  124.                 <strong class="month"><?php the_time('M') ?></strong>
  125.                 <strong class="year"><?php the_time('Y') ?></strong>
  126.                 </small>
  127.    
  128.                 <section class="content">
  129.                     <?php the_content('<p>Read the rest of this page &raquo;</p>'); ?>
  130.                 </section>
  131.                
  132.                 <div class="p-det">
  133.                 <ul>
  134.                     <li class="p-det-com"><?php comments_popup_link('No Comments', '(1) Comment', '(%) Comments'); ?></li>
  135.                     <?php if (function_exists('the_tags')) { ?> <?php the_tags('<li class="p-det-tag">Tags: ', ', ', '</li>'); ?> <?php } ?>
  136.                 </ul>
  137.                 </div>
  138.    
  139.             </article>
  140.            
  141.             <?php endwhile; endif; ?>
  142.            
  143.             <?php rewind_posts(); ?>
  144.            
  145.             <?php query_posts('posts_per_page=1author_name=admin'); if (have_posts()) : while (have_posts()) : the_post(); ?>
  146.                                
  147.             <article id="post-<?php the_ID(); ?>">
  148.            
  149.                 <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a><?php edit_post_link('Edit', ' (', ')'); ?></h2>
  150.                
  151.                 <p class="p-cat">In: <?php the_category('|') ?></p>
  152.                
  153.                 <p class="p-author"><span class="name"><?php the_author_posts_link(); ?></span> <span class="avatar"><?php echo get_avatar( $email, $size = '32' ); ?></span></p>
  154.                
  155.                
  156.                 <small class="p-time">
  157.                 <strong class="day"><?php the_time('j') ?></strong>
  158.                 <strong class="month"><?php the_time('M') ?></strong>
  159.                 <strong class="year"><?php the_time('Y') ?></strong>
  160.                 </small>
  161.    
  162.                 <section class="content">
  163.                     <?php the_content('<p>Read the rest of this page &raquo;</p>'); ?>
  164.                 </section>
  165.                
  166.                 <div class="p-det">
  167.                 <ul>
  168.                     <li class="p-det-com"><?php comments_popup_link('No Comments', '(1) Comment', '(%) Comments'); ?></li>
  169.                     <?php if (function_exists('the_tags')) { ?> <?php the_tags('<li class="p-det-tag">Tags: ', ', ', '</li>'); ?> <?php } ?>
  170.                 </ul>
  171.                 </div>
  172.    
  173.             </article>
  174.            
  175.             <?php endwhile; endif; ?>
  176.            
  177.             </ul>
  178.  
  179.         </div>
  180.         <!-- END div.leftcontent -->
  181.  
  182.         <?php get_sidebar(); ?>
  183.    
  184.     </div>
  185.     <!-- END div#maincontent -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement