0

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

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; ?>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.