Home page on my wordpress site displays url code before showing the text of my featured posts. They display normally once the post is called in their respective pages so the issue is just on the home page. How do I prevent this from happening? Screenshot of the problem and address for my home page included here.2
<?php
/**
* The template file for single post page.
*
* @package The Daybook
* @version 1.1
* @author Elite Layers <[email protected]>
* @copyright Copyright (c) 2017, Elite Layers
* @link http://demo.elitelayers.com/thedaybook/
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2 or later
*/
get_header(); ?>
<div id="thedaybook-content" class="section">
<div class="block">
<div class="container">
<div class="row">
<?php /* insert affiliate disclosure */
$affiliate_disclaimer = get_field( 'ad_affiliate_disclaimer' );
if( in_array( 'yes', $affiliate_disclaimer ) ) { ?>
<p class="disclaimer"><strong>Heads up:</strong> My posts may contain affiliate links. If you buy something through one of those links, it won't cost you a penny more, but I might get a small commission to help to keep the lights on. I don't recommend any products I have not tried and love. <a class="nowrap" href="/legal/#affiliate"><small>Learn More »</small></a></p>
<?php } /* end affiliate disclosure */ ?>
<main id="main" class="<?php echo esc_attr(thedaybook_content_class());?>">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php get_template_part('parts/content','single'); ?>
<?php endwhile; ?>
<?php endif; ?>
</main>
<aside class="<?php echo esc_attr(thedaybook_sidebar_class());?>">
<?php get_sidebar();?>
</aside>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>