How to Make my Homepage Display a Single Specific Post?

The simplest way is to go to Settings > Reading and choose “Your homepage displays” – “a static page.” That will give you a dropdown so you can choose the specific WP Page you want to display. Other options include creating a child theme or a custom theme, or in functions.php using pre_get_posts() to modify … Read more

Related Customs posts

P.S. In this project I use ONLY the same custom post type. No simple posts and other. Just “custom_post_name” customs posts. Nothing else. I am trying to make it work about few weeks. Please help me. As I understand I need only a good query and that is it. I am very beginner in WP.

query posts with selected post ids first

I’m not sure if it’s possible to do this in a single query in WordPress. You could potentially split it into two like below: <ul> <?php global $post; // Get posts by selected post ids $args = array( ‘posts_per_page’ => -1, ‘post__in’ => [12345,12543], ‘orderby’ => ‘post__in’ ); $myposts = get_posts($args); foreach ($myposts as $post) … Read more