Advertisement
mariareh64

index.php

Sep 18th, 2012
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. <?php
  2. get_header();
  3. global $woo_options;
  4. ?>
  5. <div id="content" class="col-full">
  6. <div id="main" class="col-left">
  7.  
  8. <?php if ( isset( $woo_options['woo_breadcrumbs_show'] ) && $woo_options['woo_breadcrumbs_show'] == 'true' ) { ?>
  9. <div id="breadcrumb">
  10. <?php woo_breadcrumbs(); ?>
  11. </div><!--/#breadcrumbs -->
  12. <?php } ?>
  13. <?php
  14. // Sub featured area
  15. if ( isset( $woo_options['woo_sub_featured'] ) && $woo_options['woo_sub_featured'] == 'true' && ! is_paged() ) {
  16. get_template_part( 'includes/sub-featured' );
  17. }
  18. ?>
  19.  
  20. <div id="latest"<?php if ( isset( $woo_options['woo_home_two_col'] ) && $woo_options['woo_home_two_col'] == 'true' ) echo ' class="two-col"'; ?>>
  21.  
  22. <h3 class="section"><?php _e( 'Latest News', 'woothemes' ); ?></h3>
  23. <?php
  24. // Exclude featured posts
  25. global $shownposts;
  26. if ( get_option( 'woo_exclude' ) != $shownposts && ! is_paged() ) {
  27. update_option( 'woo_exclude', $shownposts );
  28. }
  29.  
  30. if ( is_paged() ) {
  31. $shownposts = get_option( 'woo_exclude' );
  32. }
  33.  
  34. $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
  35. $args = array(
  36. 'paged'=> $paged,
  37. 'post__not_in' => $shownposts
  38. );
  39.  
  40. query_posts( $args );
  41. ?>
  42. <?php if ( have_posts() ) { $count = 0; while ( have_posts() ) { the_post(); $count++; ?>
  43.  
  44. <!-- Post Starts -->
  45. <div <?php if ( $count == 2 ) { post_class('last'); $count = 0; } else { post_class(); } ?>>
  46.  
  47. <?php if ( isset( $woo_options['woo_post_content'] ) && $woo_options['woo_post_content'] != 'content' ) woo_image( 'width=' . $woo_options['woo_thumb_w'] . '&height=' . $woo_options['woo_thumb_h'] . '&class=thumbnail ' . $woo_options['woo_thumb_align'] ); ?>
  48. <?php woo_post_meta(); ?>
  49. <h2 class="title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  50.  
  51. <div class="entry">
  52. <?php global $more; $more = 0; ?>
  53. <?php if ( isset( $woo_options['woo_post_content'] ) && $woo_options['woo_post_content'] == 'content' ) { the_content( __( 'Read More...', 'woothemes' ) ); } else { the_excerpt(); } ?>
  54. </div>
  55. <div class="fix"></div>
  56.  
  57. <div class="post-more">
  58. <?php if ( isset( $woo_options['woo_post_content'] ) && $woo_options['woo_post_content'] == 'excerpt' ) { ?>
  59. <span class="read-more"><a class="button" href="<?php the_permalink(); ?>" title="<?php esc_attr_e( 'Continue Reading &rarr;', 'woothemes' ); ?>"><?php _e( 'Continue Reading', 'woothemes' ); ?></a></span>
  60. <?php } ?>
  61. </div>
  62.  
  63. </div><!-- /.post -->
  64.  
  65. <?php
  66. }
  67. } else {
  68. ?>
  69. <div class="post">
  70. <p><?php _e( 'Sorry, no posts matched your criteria.', 'woothemes' ); ?></p>
  71. </div><!-- /.post -->
  72. <?php } ?>
  73. <?php woo_pagenav(); ?>
  74.  
  75. </div><!-- /#latest -->
  76. </div><!-- /#main -->
  77.  
  78. <?php get_sidebar(); ?>
  79.  
  80. </div><!-- /#content -->
  81.  
  82. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement