Working on a client site that displays a blog excerpt on the blog page (which shows 5 posts per page) and the main home page (which shows the latest 3 blog posts).
The trouble is I want different layouts for the excerpt. The client will always have an image/video in each post, so would like to grab this and display on the excerpt.
Here is an image of the two layouts I am trying to achieve... https://dl.dropboxusercontent.com/u/94593656/excerpts.jpg
The right layout for the blog page is fairly simple. I bring the image/video content into the excerpt by using the Advanced Excerpt plugin, however I am not sure how to achieve the left layout for the home page. Notice how the image/video and text is separated, so I cannot just call the_excerpt.
Is there a way to bring the image/video and text in separately? What would be the best way to do this?
To give you an idea, this is what I currently have for the markup for the home layout but the image is not yet dynamic, and the excerpt text is not there yet...
<?php $my_query = new WP_Query('showposts=1'); while ($my_query->have_posts()) : $my_query->the_post(); ?> <div class="aspect1"> <a href="#"><img class="block" src="<?php bloginfo('template_url'); ?>/assets/images/pic1.jpg" alt=""></a> </div> <div class="feat-text"> <time datetime="<?php the_time('Y-m-d') ?>"><?php the_date('jS F Y') ?></time> <h3 class="h2"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> <a href="<?php the_permalink(); ?>" class="viewp">View post →</a> </div> <?php endwhile; ?>
Any help would be greatly appreciated