Retrieve certain posts by their number?

How can I call certain posts by their number to place them as featured posts in specific places of my template ?
I’ve read about sticky posts , But I have about 3 places to place my featured posts and I guess I need a loop to get posts by their number I defined.

Any HELP ?!

Related posts

Leave a Reply

1 comment

  1. <?php   
    
    // The Query    
    $query = new WP_Query( 'p=7' );
    
    // The Loop
    while ( $the_query->have_posts() ) : $the_query->the_post();
        echo '<li>';
        the_title();
        echo '</li>';
    endwhile;
    
    // Reset Post Data
    wp_reset_postdata();
    ?>