• Hallo,

    I would like to add a “more-link” at the end of each shown related post in the list.

    I think, that many users do not know that they can click the headline.

    I tried to add <?php the_content(“more”); ?> in the code after the posts (i. e.: <?php the_content(“| more”); ?>). But this doesn’t work.

    Is there a possibility to get the more-link?

    Thanks for help.

    Soenke

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter soenke22

    (@soenke22)

    Hallo,

    first I tried to get the excerpt in the “Custom-php-file” – this works.

    But I use “manual” excerpts. These excerpts are too long for the related-post-list. I try to add automatically generated excerpts with a limit of words and the more-link. I know, I can limit words with a filter in the functions.php … but then my manually produced excerpts on the archive-sites are useless.

    Is there a way to get the automatic excerpt with a word limit and the more-link in the custom-php-file?

    Thanks for help!

    S?nke

    Thread Starter soenke22

    (@soenke22)

    Hallo,

    the solution:

    ” rel=”bookmark”><?php the_title(); ?><?php echo apply_filters( ‘the_content’, wp_trim_words( strip_tags( $post->post_content ), 30 ) ); ?>ID ); ?>” >mehr

    With the code “the_content” you can avoid the “the_excerpt” command and with this code you can limit the content … You can get the “read-more-link” with “get_permalink” …

    Greatings ….

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘add more-link at the end of each post in the list’ is closed to new replies.