Question: As suggested on this site, I am using this code to style an excerpt if no post format is selected/if it is a standard post.

```
<?php
$format = get_post_format();
if ( false === $format )
{
echo 'This is a default post';
the_excerpt();
}
?>

```

However, it seems there must be a better way to include it with one PHP statement... the rest of which follows this pattern:

```
if ( has_post_format( 'video' )) {
    ?>
    A VIDEO POST
    <?php the_content();
}
if ( has_post_format( 'audio' )) {
    ?>
    AN AUDIO POST
    <?php the_content();
}

```

Anybody know how to include the original code in this same if statement? If, then...

Answer: 
I prefer using template-part files, with `get_template_part()` and `get_post_format()`:

```
<?php get_template_part( 'post', get_post_format() ); ?>

```

This method will then look for, e.g. `post-gallery.php`, and fall back to `post.php` if either `post-gallery.php` doesn't exist, or if `get_post_format()` returns `false`.

Then, for each Post Format type, you simply create `post-{post-format-type}.php`, and you're good to go.
Use a switchcase instead.

```
switch ( get_post_format() ) {

case 'video':
  // video post code
  break;

case 'audio':
  // audio post code
  break;

default:
  // default post code
  break;

}

```