<head>
<title><?php 
wp_title('|', true, 'right');
?>
</title>
<?php 
wp_head();
?>
</head>
<body <?php 
body_class('single-certificate');
?>
>
<?php 
$ID = ThemexCore::getRewriteRule('certificate');
$certificate = ThemexCourse::getCertificate(themex_decode($ID), themex_decode($ID, true));
if (isset($certificate['user'])) {
    ?>
	<div class="certificate-wrap">
		<?php 
    if (!empty($certificate['background'])) {
        ?>
		<div class="substrate">
			<img src="<?php 
        echo $certificate['background'];
        ?>
" class="fullwidth" alt="" />
		</div>
		<?php 
    }
    ?>