ABooooo
9/7/2017 - 12:38 AM

show post or page with ID

show post or page with ID

$post_id = 23;
        $queried_post = get_post($post_id);
        $title = $queried_post->post_title;
        echo '<p class="jumboTitle">';
        echo $title;
        echo '</p>';
        echo $queried_post->post_content;
        
        //https://www.tipsandtricks-hq.com/query-or-show-a-specific-post-in-wordpress-php-code-example-44