Looping single post in a theme
Firstly, you don’t need to check with is_single() in single.php. WordPress will automatically recognize it for single post. Secondly, breakdown your template with in parts. Such as break your main loop code in content-single.php and call it in single.php with get_template_part(‘content’, ‘single’). So you single.php template will look like below- <?php while ( have_posts() ) … Read more