我有一张单人床。php模板,我也有索引。php,但它并没有回复到这一点,它只是说
\'关于:空白#已阻止\'
并在页面上不显示任何内容。
我已尝试将echo the\\u permalink()更改为\\u permalink(),我已将permalink设置保存到post name。我还停用了所有插件。有什么想法吗?
我的档案。php循环如下:
if (have_posts()) :
while (have_posts()) :
?>
<div class="card container mb-3">
<a href="<?php
// this conditional outputs the permalink for programmes and events, and an external url to resources
if (is_post_type_archive( $resources )) {
echo \'https://\' . get_field(\'website\');
} else {
echo the_permalink();
}
?>">
<div class="card-body row"><?php
the_post();
?>
<div class="col-sm img-fluid"><?php
the_post_thumbnail(\'medium\');
?></div>
<div class="col-sm p-2 m-0">
<h2 class="card-title text-center"><?php the_title(); ?></h2>
</a>
<?php
// This section gets any custom fields and displays them if they exist
$fields = get_fields();
if( $fields ): ?>
<ul>
<?php foreach( $fields as $name => $value ): ?>
<li><?php
echo $value;
?></li>
<?php endforeach; ?>
</ul>
<?php
endif;
?><p class="card-text"><?php the_excerpt(); ?></p>
</div>
</div> <!-- card body -->
</div><!-- card -->
<?php
endwhile;
endif;
?>
谢谢