我的wordpress网站主页在显示我的特色帖子文本之前会显示url代码。一旦在各自的页面中调用帖子,它们就会正常显示,因此问题就出现在主页上。如何防止这种情况发生?这里包含了我的主页的问题和地址的屏幕截图。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(); ?>