|
1 <?php get_header(); ?> |
|
2 |
|
3 <?php get_sidebar(); ?> |
|
4 |
|
5 <div id="main"> |
|
6 |
|
7 <div class="topstory"> |
|
8 |
|
9 <?php $the_query = new WP_Query('showposts=1'); |
|
10 |
|
11 if ($the_query->have_posts()) : |
|
12 |
|
13 while ($the_query->have_posts()) : $the_query->the_post(); |
|
14 |
|
15 $do_not_duplicate = $post->ID; |
|
16 |
|
17 ?> |
|
18 |
|
19 <?php if(get_post_meta($post->ID, "newsworthy_image_value", $single = true) != "") { ?><img src="<?php echo get_post_meta($post->ID, "newsworthy_image_value", $single = true); ?>" alt="<?php the_title_attribute(); ?>" /><?php } ?> |
|
20 |
|
21 <h1><?php the_title(); ?></h1> |
|
22 |
|
23 <?php the_excerpt(); ?> |
|
24 |
|
25 <div class="postmeta"><a href="<?php the_permalink(); ?>" class="readmore">Read more...</a><a href="<?php comments_link(); ?>" class="comments">Comments (<?php comments_number('0', '1', '%'); ?>)</a><span class="category">Filed under: <?php the_category(', ') ?></span></div> |
|
26 |
|
27 <?php endwhile; endif; ?> |
|
28 |
|
29 </div> |
|
30 |
|
31 <div class="middle"> |
|
32 |
|
33 <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Home Middle") ) : ?> |
|
34 |
|
35 <div class="box"> |
|
36 |
|
37 <h1>Middle</h1> |
|
38 |
|
39 <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus pretium pede eget neque.</p> |
|
40 |
|
41 </div> |
|
42 |
|
43 <img class="banner" src="<?php bloginfo('template_url'); ?>/images/banner.jpg" alt="125x125 Banner" /> |
|
44 |
|
45 <?php endif; ?> |
|
46 |
|
47 </div> |
|
48 |
|
49 <div id="left"> |
|
50 |
|
51 <?php $the_query = new WP_Query('showposts=6&offset=1'); |
|
52 |
|
53 $style_classes = array('first','second','third'); |
|
54 |
|
55 $style_index = 0; |
|
56 |
|
57 if ($the_query->have_posts()) : |
|
58 |
|
59 while ($the_query->have_posts()) : $the_query->the_post(); |
|
60 |
|
61 if ( $post->ID == $do_not_duplicate ) { continue; update_post_caches($posts); } |
|
62 |
|
63 ?> |
|
64 |
|
65 <div class="substory<?php $k = $style_index%3; echo " $style_classes[$k]"; $style_index++; ?>"> |
|
66 |
|
67 <?php if(get_post_meta($post->ID, "newsworthy_image_value", $single = true) != "") { ?><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, "newsworthy_image_value", $single = true); ?>&h=53&w=140&zc=1 ?>" alt="<?php the_title_attribute(); ?>" /><?php } ?> |
|
68 |
|
69 <h2><?php the_title(); ?></h2> |
|
70 |
|
71 <?php the_content_limit(90, "more"); ?> |
|
72 |
|
73 <div class="postmeta"><a href="<?php the_permalink(); ?>" class="readmore">Read more...</a></div> |
|
74 |
|
75 </div> |
|
76 |
|
77 <?php endwhile; endif; ?> |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 <div class="clear"> </div> |
|
84 |
|
85 |
|
86 |
|
87 <div class="halfcontent left"> |
|
88 |
|
89 <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Home Left") ) : ?> |
|
90 |
|
91 <h2>About this template</h2> |
|
92 |
|
93 <p><img class="left" src="<?php bloginfo('template_url'); ?>/images/boat.jpg" alt="About Me" />Newsworthy is the 16th template from <a href="#">DemusDesign</a>. It's a magazine-style template built on a 6-column grid that's perfect as a news site or any site with a lot of information. It includes a demo of a <a href="#">blog post</a> and a <a href="#">style demo</a>.</p> |
|
94 |
|
95 <?php endif; ?> |
|
96 |
|
97 </div> |
|
98 |
|
99 <div class="halfcontent left"> |
|
100 |
|
101 <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Home Right") ) : ?> |
|
102 |
|
103 <h2>License and Use</h2> |
|
104 |
|
105 <p>Newsworthy is released under the <a href="http://creativecommons.org/licenses/by/2.5/">Creative Commons 2.5</a> license, which means you can use it free, and even make derivative works, so long as you keep the attribution link back to <a href="http://demusdesign.com">DemusDesign</a> in the footer. If you do use it, contact me through my site to let me know. I love seeing my templates at work! Thanks.</p> |
|
106 |
|
107 <?php endif; ?> |
|
108 |
|
109 </div> |
|
110 |
|
111 </div> |
|
112 |
|
113 <div class="clearboth"> </div> |
|
114 |
|
115 </div> |
|
116 |
|
117 |
|
118 |
|
119 <?php get_footer(); ?> |