Vous ne pouvez pas réellement passer un argument lié à la taxonomie à get_posts(). (Edit: en fait, oui vous pouvez. Le Codex est juste quelque peu flou. En regardant la source, il get_posts()est, en son cœur, juste un wrapper pour WP_Query().) Vous pouvez passer des méta clés / valeurs et des types de publication , mais pas des taxonomies telles que la publication format. Donc pour cette ligne:
$myposts = get_posts('numberposts=-1&orderby=post_date&order=DESC');
Je recommanderais d'utiliser WP_Query()plutôt que get_posts():
$myposts = new WP_Query( array(
    'tax_query' => array(
        array(                
            'taxonomy' => 'post_format',
            'field' => 'slug',
            'terms' => array( 
                'post-format-aside',
                'post-format-audio',
                'post-format-chat',
                'post-format-gallery',
                'post-format-image',
                'post-format-link',
                'post-format-quote',
                'post-format-status',
                'post-format-video'
            ),
            'operator' => 'NOT IN'
        )
    )
) );
Remarque: oui, cela fait beaucoup de tableaux imbriqués. Les requêtes fiscales peuvent être délicates comme ça.
L'étape suivante consiste à modifier vos instructions d'ouverture / fermeture de boucle. Modifiez-les:
<?php foreach($myposts as $post) : ?>
    <?php /* loop markup goes here */ ?>
<?php endforeach; ?>
...pour ça:
<?php if ( $myposts->have_posts() ) : while ( $myposts->have_posts() ) : $myposts->the_post(); ?>
    <?php /* loop markup goes here */ ?>
<?php endwhile; endif; ?>
<?php wp_reset_postdata(); ?>
Votre balisage de boucle réel devrait pouvoir rester le même, sauf que vous n'avez plus besoin d'appeler setup_postdata( $post ):
<?php        
    $year = mysql2date('Y', $post->post_date);
    $month = mysql2date('n', $post->post_date);
    $day = mysql2date('j', $post->post_date);    
?>
<p>
    <span class="the_article">
        <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </span>
       
    <span class="the_day">
        <?php the_time('j F Y'); ?>
    </span>
</p>
Donc, tout mettre ensemble:
<?php
// Only query posts with the
// "standard" post format, which
// requires *excluding* all other
// post formats, since neither the
// "post_format" taxonomy nor the
// "post-format-standard" taxonomy term
// is applied to posts without
// defined post formats
$myposts = new WP_Query( array(
    'tax_query' => array(
        array(                
            'taxonomy' => 'post_format',
            'field' => 'slug',
            'terms' => array( 
                'post-format-aside',
                'post-format-audio',
                'post-format-chat',
                'post-format-gallery',
                'post-format-image',
                'post-format-link',
                'post-format-quote',
                'post-format-status',
                'post-format-video'
            ),
            'operator' => 'NOT IN'
        )
    )
) );
// Open the loop
if ( $myposts->have_posts() ) : while ( $myposts->have_posts() ) : $myposts->the_post(); ?>
    $year = mysql2date('Y', $post->post_date);
    $month = mysql2date('n', $post->post_date);
    $day = mysql2date('j', $post->post_date);    
    ?>
    <p>
        <span class="the_article">
            <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
        </span>
           
        <span class="the_day">
            <?php the_time('j F Y'); ?>
        </span>
    </p>  
    <?php 
// Close the loop
endwhile; endif;
// Reset $post data to default query
wp_reset_postdata();