• I’m using the newspaper theme. I have more than 2000 posts, and I want to add read more tag after certain number of words on all the post at once.
    anyone please help me

Viewing 2 replies - 1 through 2 (of 2 total)
  • Open your post list page, Maybe its on index.php, add below code any try

    Remove the <?php the_content();?> insert the below code

    <?php $content = get_the_content();
      $trimmed_content = wp_trim_words( $content, 60, '<a href="'. get_permalink() .'">...[ read more ]</a>' ); ?>
      <p><?php echo $trimmed_content; ?></p>
    (Change the 60 to your desire words length)
    Thread Starter umar66

    (@umar66)

    Thank you Clarion Technologies, It works, But when I click on read more link full page dose not display.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Read More Tag’ is closed to new replies.