Answers for "echo post content by slug"

PHP
1

echo post content by slug

$page = get_posts( array( 'name' => 'your-slug' ) );

if ( $page )
{
    echo $page[0]->post_content;
}
Posted by: Guest on March-01-2021

Browse Popular Code Answers by Language