Guest User

Untitled

a guest
Dec 11th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. <?php
  2.  
  3. // The Query
  4. $the_query = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => '3' ));
  5.  
  6. // The Loop
  7. while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
  8. <?php
  9. $category = get_the_category();
  10. echo '<div class="categorize my' . $category[0]->cat_name . '">';
  11. ?>
  12.  
  13. <div class="categoryDate">
  14. <span class="postDot"></span>
  15. <?php if ( count( get_the_category() ) ) : ?>
  16. <?php printf( __( '%2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
  17. <?php endif; ?>
  18. <?php twentyten_posted_on(); ?>
  19. </div>
  20.  
  21. <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>
  22.  
  23. <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
  24. <?php the_excerpt(); ?>
  25. <?php else : ?>
  26. <?php the_content( __( 'Continue reading &rarr;', 'twentyten' ) ); ?>
  27. <?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'twentyten' ), 'after' => '' ) ); ?>
  28. <?php endif; ?>
  29.  
  30.  
  31. <div class="tags">
  32. <?php
  33. $tags_list = get_the_tag_list( '', ', ' );
  34. if ( $tags_list ):
  35. ?>
  36. <?php printf( __( 'Tagged %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
  37. |
  38. <?php endif; ?>
  39. </div>
  40.  
  41. <div class="meta">
  42. <?php //Removed the option for comments!! comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?>
  43. <?php edit_post_link( __( 'Edit', 'twentyten' ), ' ', '' ); ?>
  44.  
  45. <?php comments_template( '', true ); ?>
  46. </div>
  47. </div>
  48.  
  49. <?php endwhile;
  50. // Reset Post Data
  51. wp_reset_postdata();
  52.  
  53. ?>
  54. </div>
  55.  
  56. <?php endwhile; ?>
  57.  
  58. <?php /* Display navigation to next/previous pages when applicable */ ?>
  59. <?php if ( $wp_query->max_num_pages > 1 ) : ?>
  60. <?php next_posts_link( __( '&larr; Older posts', 'twentyten' ) ); ?>
  61. <?php previous_posts_link( __( 'Newer posts &rarr;', 'twentyten' ) ); ?>
  62. <?php endif; ?>
  63.  
  64. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment