How to exclude post formats from wordpress recent posts in a tabs widget [closed]

@user6394526 is right…
you cant really exlude post types but you can declare which post types you want to retrieve… See his answer for an example.

The second option which is less preffered (since is would query all posts, even the ones you dont need!) is to check for post type and ignore the one you dont want…

Using your code:

function aya_last_posts($numberOfPosts = 5 , $thumb = true){
global $post;
$orig_post = $post;
$lastPosts = get_posts('numberposts=".$numberOfPosts);
foreach($lastPosts as $post): setup_postdata($post);

// BUILD POST DATA
$postid     = get_the_id();
$postformat = get_post_format($postid)

    if($postformat != "post_format_you_dont_want') {
    ?>
    <?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() && $thumb ) : ?>   
       <div class="hole-post">      
        <div class="post-thumbnail">
        <a href="https://wordpress.stackexchange.com/questions/149568/<?php the_permalink(); ?>" title="<?php printf( __( 'Permalink to %s', 'aya' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php aya_thumb('aya-medium'); ?><span class="overlay-icon"></span></a>
        </div><!-- post-thumbnail /-->
    <?php endif; ?>
        <div class="tabtitle"><h3><a href="<?php echo get_permalink( $post->ID ) ?>" 
    title="<?php echo the_title(); ?>"><?php echo the_title(); ?></a></h3></div>

    </li>
    </div>
    <?php 
    }

endforeach; 
$post = $orig_post;
}

Hope this helps…
here is a list of common post formats:

  • aside
  • chat
  • gallery
  • link
  • image
  • quote
  • status
  • video
  • audio

Unless you created a custom one you should the format name you dont want from here
example:

if($postformat != 'aside') {