Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: news
- MultiEdit: One centered column with no sidebar
- */
- get_header(); ?>
- <div id="content">
- <div class="contentTop2 newspad">
- <div id="newsTitle"><a href="<?php echo home_url(); ?>/news/">Latest News</a></div>
- <?php
- $args = array( 'numberposts' => 1, 'post_status'=>"publish",'post_type'=>"post",'orderby'=>"post_date");
- $postslist = get_posts( $args );
- foreach ($postslist as $post) : setup_postdata($post); ?>
- <div class="postNews">
- <?php if ( has_post_thumbnail() ) { /* loads the post's featured thumbnail, requires Wordpress 3.0+ */
- echo '<div class="featured-thumbnail">'; the_post_thumbnail(); echo '</div>';
- } ?>
- <div class="newsRightPost">
- <div class="newsTitle"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></div>
- <div class="newsDate">Posted <?php the_date(); ?></div>
- <div class="newsExcerpt"><?php the_excerpt(); ?></div>
- <div class="sharetext">Share This: </div>
- <div class="tweetButton"><a href="https://twitter.com/share" class="twitter-share-button" data-via="lemondropdrama" data-related="_spaceandtime" data-hashtags="drama">Tweet</a>
- <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>
- <div class="fbButton"><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Flemondropdrama.co.uk%2F&send=false&layout=button_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=35&appId=159796134099543" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe></div>
- </div>
- </div>
- <?php endforeach; ?>
- <div class="clearBoth"> </div>
- </div>
- <?php
- global $post;
- $myposts = get_posts('numberposts=10&offset=1&category=');
- foreach($myposts as $post) :
- setup_postdata($post);
- ?>
- <div class="postNews2">
- <?php if ( has_post_thumbnail() ) { /* loads the post's featured thumbnail, requires Wordpress 3.0+ */
- echo '<div class="featured-thumbnail">'; the_post_thumbnail(); echo '</div>';
- } ?>
- <div class="newsRightPost">
- <div class="newsTitle"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></div>
- <div class="newsDate">Posted <?php the_date(); ?></div>
- <div class="newsExcerpt"><?php the_excerpt(); ?></div>
- <div class="sharetext">Share This: </div>
- <div class="tweetButton"><a href="https://twitter.com/share" class="twitter-share-button" data-via="lemondropdrama" data-related="_spaceandtime" data-hashtags="drama">Tweet</a>
- <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>
- <div class="fbButton"><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Flemondropdrama.co.uk%2F&send=false&layout=button_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=35&appId=159796134099543" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe></div>
- </div>
- </div>
- <?php endforeach; ?>
- <?php query_posts( 'posts_per_page=1' ); ?>
- <div class="oldernewer">
- <p class="older"><?php next_posts_link('« Older Entries') ?></p>
- <p class="newer"><?php previous_posts_link('Newer Entries »') ?></p>
- </div><!--.oldernewer-->
- <?php // end of content bottom ?>
- <div class="roundededge"> </div>
- <div class="clearBoth"> </div>
- </div><!--#content-->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement