1. <?php
  2. /*
  3. Template Name: news
  4. MultiEdit: One centered column with no sidebar
  5. */
  6.  
  7. get_header(); ?>
  8.  
  9. <div id="content">
  10. <div class="contentTop2 newspad">
  11.  
  12. <div id="newsTitle"><a href="<?php echo home_url(); ?>/news/">Latest News</a></div>
  13.  
  14.  
  15.  
  16.  
  17. <?php
  18. $args = array( 'numberposts' => 1, 'post_status'=>"publish",'post_type'=>"post",'orderby'=>"post_date");
  19. $postslist = get_posts( $args );
  20.  
  21. foreach ($postslist as $post) : setup_postdata($post); ?>
  22. <?php $exclude_first_post = $post->ID; ?>
  23. <div class="postNews">
  24.  
  25. <?php if ( has_post_thumbnail() ) { /* loads the post's featured thumbnail, requires Wordpress 3.0+ */
  26. echo '<div class="featured-thumbnail">'; the_post_thumbnail(); echo '</div>';
  27. } ?>
  28.  
  29. <div class="newsRightPost">
  30.  
  31. <div class="newsTitle"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></div>
  32. <div class="newsDate">Posted&nbsp;<?php the_date(); ?></div>
  33. <div class="newsExcerpt"><?php the_excerpt(); ?></div>
  34.  
  35. <div class="sharetext">Share This:&nbsp;&nbsp;</div>
  36. <div class="tweetButton"><a href="https://twitter.com/share" class="twitter-share-button" data-via="lemondropdrama" data-related="_spaceandtime" data-hashtags="drama">Tweet</a>
  37. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></div>
  38.  
  39. <div class="fbButton"><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Flemondropdrama.co.uk%2F&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35&amp;appId=159796134099543" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe></div>
  40. </div>
  41.  
  42. </div>
  43. <?php endforeach; ?>
  44.  
  45. <div class="clearBoth">&nbsp;</div>
  46. </div>
  47.  
  48.  
  49.  
  50. <?php
  51.  
  52.  
  53.  
  54. $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  55. $args= array(
  56. 'posts_per_page' => 10,
  57. 'paged' => $paged,
  58. 'post__not_in' => array($exclude_first_post)
  59. );
  60.  
  61.  
  62.  
  63.  
  64. query_posts($args);
  65. ?>
  66. <?php while ( have_posts() ) : the_post(); ?>
  67. <div class="postNews2">
  68. <?php if ( has_post_thumbnail() ) { /* loads the post's featured thumbnail, requires Wordpress 3.0+ */
  69. echo '<div class="featured-thumbnail">'; the_post_thumbnail(); echo '</div>';
  70. } ?>
  71.  
  72. <div class="newsRightPost">
  73.  
  74. <div class="newsTitle"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></div>
  75. <div class="newsDate">Posted&nbsp;<?php the_date(); ?></div>
  76. <div class="newsExcerpt"><?php the_excerpt(); ?></div>
  77.  
  78. <div class="sharetext">Share This:&nbsp;&nbsp;</div>
  79. <div class="tweetButton"><a href="https://twitter.com/share" class="twitter-share-button" data-via="lemondropdrama" data-related="_spaceandtime" data-hashtags="drama">Tweet</a>
  80. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></div>
  81.  
  82. <div class="fbButton"><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Flemondropdrama.co.uk%2F&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35&amp;appId=159796134099543" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe></div>
  83. </div>
  84.  
  85. </div>
  86.  
  87.  
  88. <?php endwhile; ?>
  89.  
  90. <div class="oldernewer">
  91. <p class="older"><?php next_posts_link('&laquo; Older Entries') ?></p>
  92. <p class="newer"><?php previous_posts_link('Newer Entries &raquo;') ?></p>
  93. </div><!--.oldernewer-->
  94.  
  95.  
  96.  
  97. <?php // end of content bottom ?>
  98. <div class="roundededge">&nbsp;</div>
  99. <div class="clearBoth">&nbsp;</div>
  100. </div><!--#content-->
  101.  
  102.  
  103.  
  104. <?php get_footer(); ?>