Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array( 'numberposts' => 6, 'order' =>'DESC', 'post_status'=>"publish",'post_type'=>"post",'orderby'=>"post_date");
- //'order' above can be changed to 'ASC'
- $postslist = get_posts( $args );
- foreach ($postslist as $post) : setup_postdata($post); ?>
- <div class="events">
- <!------------------------Teaser---------------------------------------->
- <!--You can display your own teaser using custom fields (in the blog post editor), providing that each post has the same custom field name (in this case teaser) -->
- <?php echo get_post_meta($post->ID, 'teaser', true);?>
- <!-------------------------Content--------------------------------------->
- <!-- The content displays all the content in the blog post including any html and images.
- If you wish to display a snippet use <?php the_excerpt();?>, this removes all images and HTML
- You can also use the quick tag <!--more--><!-- in your blog posts to provide a cut off point
- and still use the_content();?>-->
- <?php the_content();?>
- <!--------------------------Images---------------------------------------->
- <!-- the post thumbnail can be used to fetch a feature image, which can be set in post editor
- (bottom right) can be useful if you use excerpt above -->
- <!--<?php the_post_thumbnail();?>-->
- <!-- If you want more control over the size of the feature image change the_post_thumbnail() to: -->
- <!--<?php echo get_the_post_thumbnail($post->ID, 'full'); ?>-->
- <!-- The above will display the full size of the image. You can change this for medium or large too or
- specify a custom size below-->
- <!--<?php echo get_the_post_thumbnail($post->ID, array(100,100), 'thumbnail');?>-->
- </div>
- <?php endforeach; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement