Guest User

Untitled

a guest
Jan 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.84 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Blog
  4. */
  5. ?>
  6.  
  7. <?php get_header(); ?>
  8. <?php
  9. global $woo_options;
  10. if (is_paged()) $is_paged = true; else $is_paged = '';
  11. $counter = 0; $postcount = 0;
  12. ?>
  13.  
  14. <div id="main">
  15. <div id="main-page1">
  16. <?php $mypageid = $post->ID; ?>
  17. <?php query_posts(array('page_id' => $mypageid)); ?>
  18. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  19. <div class="entry"><?php the_content(); ?></div>
  20. <?php endwhile; endif; ?>
  21. <div class="fix"></div>
  22. </div><!-- /#main-page1 -->
  23. <?php if ($woo_options['woo_slider'] == 'true' && !$is_paged ) include ( TEMPLATEPATH . '/includes/slider.php' ); ?>
  24.  
  25. <?php
  26. $exclude = '';
  27. if ( $woo_options['woo_slider_exclude'] == "true" AND $woo_options['woo_slider'] == 'true' )
  28. $exclude = get_option('woo_exclude');
  29. $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  30. $args = array( 'post__not_in' => $exclude, 'paged'=> $paged);
  31. ?>
  32. <?php query_posts($args); ?>
  33. <?php if (have_posts()) : $count = 0; ?>
  34. <?php while (have_posts()) : the_post(); $postcount++;?>
  35.  
  36. <!-- Home Ad Space -->
  37. <?php if ( $woo_options['woo_ad_home'] == 'true' AND !$is_paged AND $postcount == ($woo_options['woo_ad_home_pos']+1) ) { ?>
  38. <div class="home-ad" <?php if ($woo_options['woo_ad_home_pos'] == 0) echo 'style="margin-top:0;"'; ?>>
  39. <?php if ($woo_options['woo_ad_home_adsense'] <> "") { echo stripslashes($woo_options['woo_ad_home_adsense']); } else { ?>
  40. <a href="<?php echo $woo_options['woo_ad_home_url']; ?>"><img src="<?php echo $woo_options['woo_ad_home_image']; ?>" width="468" height="60" alt="advert" /></a>
  41. <?php } ?>
  42. </div><!-- /#homead -->
  43. <?php } ?>
  44. <!-- /Home Ad Space -->
  45.  
  46. <!-- Featured Starts -->
  47. <?php if ( $postcount <= $woo_options['woo_featured_posts'] && !$is_paged ) { ?>
  48.  
  49. <div class="box post">
  50.  
  51. <div class="featuredpost">
  52.  
  53. <?php woo_image('width='.$woo_options['woo_feat_image_width'].'&height='.$woo_options['woo_feat_image_height'].'&class=feat-image'); ?>
  54.  
  55. <div class="date-comments">
  56. <p class="fl"><?php the_time( get_option( 'date_format' ) ); ?></p>
  57. <p class="fr"><span class="comments"></span><?php comments_popup_link(__('0 Comments', 'woothemes'), __('1 Comment', 'woothemes'), __('% Comments', 'woothemes')); ?></p>
  58. </div>
  59.  
  60. <h2 class="title"><a title="<?php _e('Permanent Link to', 'woothemes'); ?> <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  61.  
  62. <div class="entry">
  63. <?php if ( $woo_options['woo_content_feat'] == "content" ) { the_content('[...]'); } else { the_excerpt(); ?><?php } ?>
  64. </div>
  65.  
  66. <div class="fix"></div>
  67. <span class="continue"><a title="<?php _e('Permanent Link to', 'woothemes'); ?> <?php the_title(); ?>" href="<?php the_permalink() ?>"><?php _e('Continue reading...', 'woothemes'); ?></a></span>
  68.  
  69. </div><!--/featuredpost -->
  70.  
  71. </div><!--/box -->
  72.  
  73. <?php continue; } ?>
  74. <!-- Featured Ends -->
  75.  
  76. <?php $counter++; ?>
  77.  
  78. <div class="block<?php if ( !$is_paged && $woo_options['woo_home_one_col'] == "false" ) echo ' two-col'; ?><?php if ($counter == 2) { echo ' last'; $counter=0; } ?>">
  79. <div class="box post">
  80.  
  81. <div class="date-comments">
  82. <p class="fl"><?php the_time( get_option( 'date_format' ) ); ?></p>
  83. <p class="fr"><span class="comments"></span><?php comments_popup_link(__('0 Comments', 'woothemes'), __('1 Comment', 'woothemes'), __('% Comments', 'woothemes')); ?></p>
  84. </div>
  85.  
  86. <h2 class="title"><a title="<?php _e('Permanent Link to', 'woothemes'); ?> <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  87.  
  88. <?php if ( $woo_options['woo_content_normal'] != "content" AND !( $woo_options['woo_home_one_col'] == "true" AND woo_embed('') ) ) woo_image('width='.$woo_options['woo_thumb_image_width'].'&height='.$woo_options['woo_thumb_image_height'].'&class=post-thumbnail'); ?>
  89.  
  90. <?php if ( $woo_options['woo_home_one_col'] == "true" ) echo woo_embed('key=embed&width=540&height=400'); ?>
  91.  
  92. <div class="entry">
  93. <?php if ( $woo_options['woo_content_normal'] == "content" ) { the_content(__('Continue reading...', 'woothemes')); } else { the_excerpt(); ?><?php } ?>
  94. </div>
  95. <div class="fix"></div>
  96. <?php if ( $woo_options['woo_content_normal'] != "content" ) { ?><span class="continue"><a title="<?php _e('Permanent Link to', 'woothemes'); ?> <?php the_title(); ?>" href="<?php the_permalink() ?>"><?php _e('Continue reading...', 'woothemes'); ?></a></span><?php } ?>
  97.  
  98. </div> <!-- end .box -->
  99. </div> <!-- block -->
  100.  
  101. <?php if ( $counter == 0 && !$is_paged && $woo_options['woo_home_one_col'] == "false" ) { ?><div class="fix"></div><?php } ?>
  102.  
  103. <?php endwhile; ?>
  104. <?php endif; ?>
  105.  
  106. <div class="fix"></div>
  107.  
  108. <?php woo_pagenav(); ?>
  109.  
  110. </div><!--/centercol-->
  111.  
  112. <?php get_sidebar(); ?>
  113.  
  114. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment