• Resolved NickG

    (@nickg)


    How can I limit the amount of text per post on the front page and have a “More” link?

    I have tried using the “Limit Posts” and “Content and Excerpt Word Limit” plugins but neither work on the front page. I have gotten them to work on the single post page (just to make sure they are working).

    Any help would be appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You could try replacing <?php the_content();?> in index.php with:

    <?php the_excerpt();?>
    <p><a class="more-link" href="<?php the_permalink() ?>"><?php the_title(); ?> - read more</a></p>

    You could also use a plugin. The viva content trimmer is a good plugin that you just upload and activate, then replace the_content() with

    viva_content_limit(250,”Read More”,true);

    Thread Starter NickG

    (@nickg)

    I tried the suggestions above. They didn’t work. As a matter of fact I removed the_content() from index.php and the page still loaded with all the content.

    Thread Starter NickG

    (@nickg)

    OK I found it. The code is located in common.php. If you modify the_content() there it works.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Limiting text on front page’ is closed to new replies.