latest-post

-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

 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 );
?>

About Author:

Kalpesh Chavada

Kalpesh Chavada is Our Founder & CEO of Akshar Group Technologies. He is serving with 11+ years of experience in different technologies like Magento, WordPress, Laravel, jQuery, Shopify, Branding, and Digital Marketing. He is very good with creative logic and always ready to take on challenges.

Kalpesh Author