web/wp-content/themes/newsworthy/index.php
author ymh <ymh.work@gmail.com>
Mon, 22 Mar 2010 16:36:28 +0100
changeset 5 ac511f1ccc8e
parent 1 0d28b7c10758
permissions -rw-r--r--
add hgignore
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
0d28b7c10758 First commit
ymh
parents:
diff changeset
     1
<?php get_header(); ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
     2
0d28b7c10758 First commit
ymh
parents:
diff changeset
     3
<?php get_sidebar(); ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
     4
0d28b7c10758 First commit
ymh
parents:
diff changeset
     5
<div id="main">
0d28b7c10758 First commit
ymh
parents:
diff changeset
     6
0d28b7c10758 First commit
ymh
parents:
diff changeset
     7
	<div class="topstory">
0d28b7c10758 First commit
ymh
parents:
diff changeset
     8
0d28b7c10758 First commit
ymh
parents:
diff changeset
     9
<?php $the_query = new WP_Query('showposts=1');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    10
0d28b7c10758 First commit
ymh
parents:
diff changeset
    11
if ($the_query->have_posts()) :
0d28b7c10758 First commit
ymh
parents:
diff changeset
    12
0d28b7c10758 First commit
ymh
parents:
diff changeset
    13
  while ($the_query->have_posts()) : $the_query->the_post();
0d28b7c10758 First commit
ymh
parents:
diff changeset
    14
0d28b7c10758 First commit
ymh
parents:
diff changeset
    15
  $do_not_duplicate = $post->ID;
0d28b7c10758 First commit
ymh
parents:
diff changeset
    16
0d28b7c10758 First commit
ymh
parents:
diff changeset
    17
?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    18
0d28b7c10758 First commit
ymh
parents:
diff changeset
    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 } ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    20
0d28b7c10758 First commit
ymh
parents:
diff changeset
    21
	<h1><?php the_title(); ?></h1>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    22
0d28b7c10758 First commit
ymh
parents:
diff changeset
    23
	<?php the_excerpt(); ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    24
0d28b7c10758 First commit
ymh
parents:
diff changeset
    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>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    26
0d28b7c10758 First commit
ymh
parents:
diff changeset
    27
<?php endwhile; endif; ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    28
0d28b7c10758 First commit
ymh
parents:
diff changeset
    29
	</div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    30
0d28b7c10758 First commit
ymh
parents:
diff changeset
    31
<div class="middle">
0d28b7c10758 First commit
ymh
parents:
diff changeset
    32
0d28b7c10758 First commit
ymh
parents:
diff changeset
    33
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Home Middle") ) : ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    34
0d28b7c10758 First commit
ymh
parents:
diff changeset
    35
	<div class="box">
0d28b7c10758 First commit
ymh
parents:
diff changeset
    36
0d28b7c10758 First commit
ymh
parents:
diff changeset
    37
	<h1>Middle</h1>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    38
0d28b7c10758 First commit
ymh
parents:
diff changeset
    39
	<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus pretium pede eget neque.</p>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    40
0d28b7c10758 First commit
ymh
parents:
diff changeset
    41
	</div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    42
0d28b7c10758 First commit
ymh
parents:
diff changeset
    43
	<img class="banner" src="<?php bloginfo('template_url'); ?>/images/banner.jpg" alt="125x125 Banner" />
0d28b7c10758 First commit
ymh
parents:
diff changeset
    44
0d28b7c10758 First commit
ymh
parents:
diff changeset
    45
<?php endif; ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    46
0d28b7c10758 First commit
ymh
parents:
diff changeset
    47
</div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    48
0d28b7c10758 First commit
ymh
parents:
diff changeset
    49
<div id="left">
0d28b7c10758 First commit
ymh
parents:
diff changeset
    50
0d28b7c10758 First commit
ymh
parents:
diff changeset
    51
<?php $the_query = new WP_Query('showposts=6&offset=1');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    52
0d28b7c10758 First commit
ymh
parents:
diff changeset
    53
$style_classes = array('first','second','third');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    54
0d28b7c10758 First commit
ymh
parents:
diff changeset
    55
$style_index = 0;
0d28b7c10758 First commit
ymh
parents:
diff changeset
    56
0d28b7c10758 First commit
ymh
parents:
diff changeset
    57
if ($the_query->have_posts()) :
0d28b7c10758 First commit
ymh
parents:
diff changeset
    58
0d28b7c10758 First commit
ymh
parents:
diff changeset
    59
  while ($the_query->have_posts()) : $the_query->the_post();
0d28b7c10758 First commit
ymh
parents:
diff changeset
    60