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'm not sure I understand. Do you just want to join all the if-statements together? If that's the case you could use elseif, like so:

```
<?php
$format = get_post_format();
if ( false === $format ) {
echo 'This is a default post';
the_excerpt();
} elseif ( has_post_format( 'video' )) { ?>
   A VIDEO POST
    <?php the_content();
} elseif ( has_post_format( 'audio' )) { ?>
    AN AUDIO POST
    <?php the_content();
}
?>

```
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;

}

```