If there is only one post (show elements) else (show other elements)

You can get the number of posts in the current loop from the $wp_query object. How you do it will depend on whether you use the main loop or a custom one.

Main loop

Use the global query object.

<?php 

    global $wp_query;
    $is_single_post = ($wp_query->post_count === 1);

?>
<?php if ($is_single_post): ?>

  <div class="one-post"></div>

<?php else: ?>

  <div class="multi-post"></div>

<?php endif; ?>

Custom loop

Use your own query object.

<?php 

    $args = array(
            // fetch post type and whatnot
        );
    $query = new WP_Query($args);


?>
<?php if ($query->have_posts()): ?>

    <?php if ($query->post_count === 1): ?>

        <div class="one-post"></div>

    <?php else: ?>

        <div class="multi-post"></div>

    <?php endif; ?>

<?php endif; ?>

tech