Get Latest Post In Wordpress

-Display Latest post -you wont post it paste this code on page -change the catagary id -show the letast post in your page - 'orderby' => 'post_date', this attribute compulsory

<?php 
$args = array(
    'posts_per_page'   => 1,  //limition of post per page
    'offset'           => 0,
    'category'         => '', //id of catagary
    'orderby'          => 'post_date', // this point important of define of get latast post
    'order'            => 'DESC',
    'include'          => '',
    'exclude'          => '',
    'meta_key'         => '',
    'meta_value'       => '',
    'post_type'        => 'post',
    'post_mime_type'   => '',
    'post_parent'      => '',
    'post_status'      => 'publish',
    'suppress_filters' => true ); 
    
    $myposts = get_posts( $args );
?>

<?php foreach ( $myposts as $post ) : setup_postdata( $post ); ?>
<div class="latest_post ">
            <div class="banner-block banner-block-3">
                <div class="lightpnik-bg text-block">
                    <h2>LATEST POSTS</h2>
                    <div class="post-date post_title"><?php the_title(); ?></div>
                    <div class="post-date"><?php the_date('j.m.Y'); ?></div>
                    <p>"<?php echo strip_tags(substr(get_the_content(),0,270)).'....'; ?> "</p>  
                    <div class="insta-link"><a target="_parent" href="<?php get_site_url(); ?>" class="button" >View all</a></div>
                </div>
            </div>
        </div>
<?php endforeach; wp_reset_postdata();?>