admin管理员组文章数量:1391951
In my index.php I'am looping like this:
<?php
while(have_posts()) {
the_post(); ?>
<article>
<h2><?php the_title(); ?></h2>
<p>Veröffentlicht von <?php the_author_posts_link(); ?>am <?php the_time('n.j.y'); ?> in <?php echo get_the_category_list(', '); ?></p>
<p>
<?php the_excerpt(); ?>
</p>
**<p><a class="article-read-more" href="<?php the_permalink(); ?>">Continue reading »</a></p>
</article>**
<?php }
echo paginate_links();
?>
But I don't see the "continue reading button. Thanks for help. Best, Sven
In my index.php I'am looping like this:
<?php
while(have_posts()) {
the_post(); ?>
<article>
<h2><?php the_title(); ?></h2>
<p>Veröffentlicht von <?php the_author_posts_link(); ?>am <?php the_time('n.j.y'); ?> in <?php echo get_the_category_list(', '); ?></p>
<p>
<?php the_excerpt(); ?>
</p>
**<p><a class="article-read-more" href="<?php the_permalink(); ?>">Continue reading »</a></p>
</article>**
<?php }
echo paginate_links();
?>
But I don't see the "continue reading button. Thanks for help. Best, Sven
Share Improve this question asked Mar 14, 2020 at 19:40 S.HS.H 1054 bronze badges1 Answer
Reset to default 0In case this is the original sourcecode, there are two asterix pairs, which might break your code (getting interpreted as comments and therefore are not visible).
Remove these and it should work.
<?php
// Start the loop
if(have_posts() ) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php $format = get_post_format(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class($format); ?>>
<?php the_title(); ?>
<?php the_category(); ?>
<?php the_date(); ?>
<?php the_excerpt(); ?>
<?php the_tags('<ul class="taglist"><li>', '</li><li>', '</li></ul>'); ?>
<a href="<?php the_permalink(); ?>">read more</a>
</article>
<?php endwhile; ?>
本文标签: blog pageWhy is thepermalink not working
版权声明:本文标题:blog page - Why is the_permalink not working? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744668075a2618653.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论