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 &raquo;</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 &raquo;</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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

In 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