Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

grid

By: a guest on Feb 27th, 2014  |  syntax: None  |  size: 1.24 KB  |  views: 51  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /**
  3.  * Template Name: Category
  4.  */
  5. remove_action( 'genesis_loop', 'genesis_do_loop' ); // Remove default loop
  6. add_action( 'genesis_loop', 'category_page' );
  7. function category_page() { ?>
  8. <div class="customcontentslider">
  9. <?php echo do_shortcode('[do_widget id=wooslider_slideshow_posts-2 ]') ?>
  10. </div>
  11. <div class="grids">
  12. <?php if(have_posts()): $j=1; while(have_posts()):the_post(); ?>
  13. <div class="grid <?php if ( $j & 1 ) echo "odd_g"; else echo "even_g"; ?>">
  14. <div class="featured">
  15. <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('home-middle'); ?></a>
  16. </div>
  17. <a href="<?php the_permalink(); ?>"><h2><?php the_title(); ?></h2></a>
  18. <div class="post_meta">
  19. <span class="date"><?php echo get_the_date(); ?></span> - <span class="author"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_meta( 'display_name' ); ?></a></span> - <span class="comment"> <?php comments_number( '0 Comments', '1 Comment', '% Comments' ); ?></span>
  20. </div>
  21. <div class="excerpt">
  22. <?php $exe = strip_tags(get_the_excerpt()); echo substr($exe,0,100).'...'; ?>
  23. </div>
  24. </div>
  25. <?php $j++; endwhile;  endif; ?>
  26. </div>
  27. <div class="g_pagination">
  28. <?php genesis_numeric_posts_nav(); ?>
  29. </div>
  30. <?php }
  31. genesis();
clone this paste RAW Paste Data