Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // The Query
- $the_query = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => '3' ));
- // The Loop
- while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
- <?php
- $category = get_the_category();
- echo '<div class="categorize my' . $category[0]->cat_name . '">';
- ?>
- <div class="categoryDate">
- <span class="postDot"></span>
- <?php if ( count( get_the_category() ) ) : ?>
- <?php printf( __( '%2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
- <?php endif; ?>
- <?php twentyten_posted_on(); ?>
- </div>
- <h2><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
- <?php the_excerpt(); ?>
- <?php else : ?>
- <?php the_content( __( 'Continue reading →', 'twentyten' ) ); ?>
- <?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'twentyten' ), 'after' => '' ) ); ?>
- <?php endif; ?>
- <div class="tags">
- <?php
- $tags_list = get_the_tag_list( '', ', ' );
- if ( $tags_list ):
- ?>
- <?php printf( __( 'Tagged %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
- |
- <?php endif; ?>
- </div>
- <div class="meta">
- <?php //Removed the option for comments!! comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?>
- <?php edit_post_link( __( 'Edit', 'twentyten' ), ' ', '' ); ?>
- <?php comments_template( '', true ); ?>
- </div>
- </div>
- <?php endwhile;
- // Reset Post Data
- wp_reset_postdata();
- ?>
- </div>
- <?php endwhile; ?>
- <?php /* Display navigation to next/previous pages when applicable */ ?>
- <?php if ( $wp_query->max_num_pages > 1 ) : ?>
- <?php next_posts_link( __( '← Older posts', 'twentyten' ) ); ?>
- <?php previous_posts_link( __( 'Newer posts →', 'twentyten' ) ); ?>
- <?php endif; ?>
- <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment