File: /home/atiscoir/public_html/wp-content/themes/myco/single.php
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Myco
* @since 4.0.0
*/
get_header();
$theme_option = get_option('tmt_theme_config_option', [] );
$id = $theme_option['tmt-single-post'];
if(!empty($id)) {
TMT_Elementor::get_single_content();
} else {
while ( have_posts() ) : the_post();
$title = get_the_title();
echo "<div class='content' style='max-width: 800px;margin: 50px auto;'>";
tmt_post_thumbnail('large');
echo "<h1>$title</h1>";
the_content();
echo "</div>";
endwhile;
}
get_footer();