【发布时间】:2019-07-25 14:32:03
【问题描述】:
我创建了一个自定义模板 php 文件并制作了一个使用该模板的页面。
在这个模板中,我想显示我的博客文章,我复制了与首页相同的代码行来检索它们,但它不起作用。
它显示了一个不可点击的链接,而不是我的博客文章:https://imgur.com/a/B9ohq96
我该如何解决?
我试图将代码放入它自己的页面中,但它不起作用。
有一个 list.php 我用作模板但没有用
<?php
/*
Template Name: list
*/
?>
<?php wp_header(); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="blogo">
<h4> <?php the_category(); ?> <h4>
<h3><?php the_title(); ?></h3>
<?php the_excerpt(); ?>
<a href="<?php the_permalink(); ?> > See the post </a>
</div>
<?php endwhile;>
<?php wp_footer(); ?>
【问题讨论】: