How do I check if is page template in WordPress

if (is_page_template('path/template-name.php')) { 
    // Content here
}

Leave a Reply