Advertisement
Guest User

alphabetical archives

a guest
Apr 30th, 2014
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. <div class="date">
  2.     <?php
  3.     $args = array( 'posts_per_page' => -1, 'order'=> 'ASC', 'orderby' => 'title' );
  4.     $postslist = get_posts( $args );
  5.     foreach ( $postslist as $post ) :
  6.         setup_postdata( $post ); ?>
  7.         <div class="date-wrap">
  8.             <div class="date-text">
  9.                 <a href="<?php the_permalink(); ?>">
  10.                     <?php the_time( get_option( 'date_format' ) ); ?>
  11.                 </a>
  12.             </div>
  13.             <div class="title-text">
  14.                 <a href="<?php the_permalink(); ?>">
  15.                     <?php the_title(); ?>
  16.                 </a>
  17.             </div>
  18.         </div>
  19.     <?php
  20.     endforeach;
  21.     wp_reset_postdata();
  22.     ?>
  23. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement