Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Blog
- */
- ?>
- <?php get_header(); ?>
- <?php
- global $woo_options;
- if (is_paged()) $is_paged = true; else $is_paged = '';
- $counter = 0; $postcount = 0;
- ?>
- <div id="main">
- <div id="main-page1">
- <?php $mypageid = $post->ID; ?>
- <?php query_posts(array('page_id' => $mypageid)); ?>
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
- <div class="entry"><?php the_content(); ?></div>
- <?php endwhile; endif; ?>
- <div class="fix"></div>
- </div><!-- /#main-page1 -->
- <?php if ($woo_options['woo_slider'] == 'true' && !$is_paged ) include ( TEMPLATEPATH . '/includes/slider.php' ); ?>
- <?php
- $exclude = '';
- if ( $woo_options['woo_slider_exclude'] == "true" AND $woo_options['woo_slider'] == 'true' )
- $exclude = get_option('woo_exclude');
- $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
- $args = array( 'post__not_in' => $exclude, 'paged'=> $paged);
- ?>
- <?php query_posts($args); ?>
- <?php if (have_posts()) : $count = 0; ?>
- <?php while (have_posts()) : the_post(); $postcount++;?>
- <!-- Home Ad Space -->
- <?php if ( $woo_options['woo_ad_home'] == 'true' AND !$is_paged AND $postcount == ($woo_options['woo_ad_home_pos']+1) ) { ?>
- <div class="home-ad" <?php if ($woo_options['woo_ad_home_pos'] == 0) echo 'style="margin-top:0;"'; ?>>
- <?php if ($woo_options['woo_ad_home_adsense'] <> "") { echo stripslashes($woo_options['woo_ad_home_adsense']); } else { ?>
- <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>
- <?php } ?>
- </div><!-- /#homead -->
- <?php } ?>
- <!-- /Home Ad Space -->
- <!-- Featured Starts -->
- <?php if ( $postcount <= $woo_options['woo_featured_posts'] && !$is_paged ) { ?>
- <div class="box post">
- <div class="featuredpost">
- <?php woo_image('width='.$woo_options['woo_feat_image_width'].'&height='.$woo_options['woo_feat_image_height'].'&class=feat-image'); ?>
- <div class="date-comments">
- <p class="fl"><?php the_time( get_option( 'date_format' ) ); ?></p>
- <p class="fr"><span class="comments"></span><?php comments_popup_link(__('0 Comments', 'woothemes'), __('1 Comment', 'woothemes'), __('% Comments', 'woothemes')); ?></p>
- </div>
- <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>
- <div class="entry">
- <?php if ( $woo_options['woo_content_feat'] == "content" ) { the_content('[...]'); } else { the_excerpt(); ?><?php } ?>
- </div>
- <div class="fix"></div>
- <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>
- </div><!--/featuredpost -->
- </div><!--/box -->
- <?php continue; } ?>
- <!-- Featured Ends -->
- <?php $counter++; ?>
- <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; } ?>">
- <div class="box post">
- <div class="date-comments">
- <p class="fl"><?php the_time( get_option( 'date_format' ) ); ?></p>
- <p class="fr"><span class="comments"></span><?php comments_popup_link(__('0 Comments', 'woothemes'), __('1 Comment', 'woothemes'), __('% Comments', 'woothemes')); ?></p>
- </div>
- <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>
- <?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'); ?>
- <?php if ( $woo_options['woo_home_one_col'] == "true" ) echo woo_embed('key=embed&width=540&height=400'); ?>
- <div class="entry">
- <?php if ( $woo_options['woo_content_normal'] == "content" ) { the_content(__('Continue reading...', 'woothemes')); } else { the_excerpt(); ?><?php } ?>
- </div>
- <div class="fix"></div>
- <?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 } ?>
- </div> <!-- end .box -->
- </div> <!-- block -->
- <?php if ( $counter == 0 && !$is_paged && $woo_options['woo_home_one_col'] == "false" ) { ?><div class="fix"></div><?php } ?>
- <?php endwhile; ?>
- <?php endif; ?>
- <div class="fix"></div>
- <?php woo_pagenav(); ?>
- </div><!--/centercol-->
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment