I was wondering how I can style different post formats differently on the home page.
I set up all the formats and grabbed this code from a tutorial website, that displays all the different formats on the page:
index.php
<?php
get_header();
?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
<?php else : ?>
<article id="post-0" class="post no-results not-found">
<section>
<h3><a href="#">Oops!</a></h3>
<p>
Sorry No Content here!
</p>
<section>
</article><!-- #post-0 -->
<?php endif; ?>
<div id='postNavi'>
<div class='older'><?php next_posts_link('Older Entries »');?></div>
<div class='newer'><?php previous_posts_link('« Newer Entries');?> </div>
</div>
<?php
get_footer();
?>
The two formats I use are: content-aside.php
<article id="post-<?php the_ID(); ?>" <?php post_class();?> >
<h1>
<?php if(is_single()) {?>
<?php the_title();?>
<?php } else { ?>
<a href="<?php the_permalink();?>"><?php the_title();?></a>
<?php }?>
</h1>
<div class='postMeta2'>
<a href="<?php the_permalink();?>"><?php the_time('j. F Y') ; ?> </a>
</div>
<section class='multi-column'>
<?php
the_content('Weiterlesen');
?>
</section>
<div class='postInfo'>
<div class='postCategories'>
Bereich: <br> <?php the_category(', ') ?>
</div>
</div>
</article>
and content-quote.php
<article id="post-<?php the_ID(); ?>" <?php post_class();?> >
<center><h11>
<?php if(is_single()) {?>
<?php the_title();?>
<?php } else { ?>
<a href="<?php the_permalink();?>"><?php the_title();?></a>
<?php }?>
</h11></center>
<div class='postMeta'>
<a href="<?php the_permalink();?>"><?php the_time('j. F Y') ; ?></a>
</div>
<section>
<blockquote>
<?php
the_content('read the rest');
?>
</blockquote>
</section>
<div class='postInfo'>
<div class='postCategories'>
posted under: <?php the_category(', ') ?>
</div>
</div>
</article>
I want the the post format "quote" to stay this way, but i want to have the "content-aside" posts as excerpts (without setting up a custom excerpt for every post). Right now it displays the entire post of the format "aside".
I'm fairly new to Wordpress and I hope you can help me.
Thanks in advance :)