[resolved] What plugin for the_content_limit ? (4 posts)

  1. tomasi514
    Posted 7 years ago #

    Hi there, first post here, great community around, here is my first post in this forum:

    I have seen a couple of issues with "the_content_limit" function, I also have the "fatal error: Call to undefined function the_content_limit()" message, I installed different plugins to make it work but no success up to now, can anybody help me ?
    Here is my entire code for a sidebar in which I want to display 80 first words of 3 last posts of category 7. (only the_content_line function does not work).

    <div id="sidebar">
    <h2>Last Posts</h2>
    $lastposts = get_posts('category=7&numberposts=3');
    foreach($lastposts as $post) :
    <h2>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></h2>
    <?php the_content_limit(80, "read more ยป"); ?>
    <?php endforeach; ?>

    Anybody can help me? Thanks!!

  2. MichaelH
    Posted 7 years ago #

    This search:

    found this topic:

    that pointed to this:

    Install and activate the plugin then you should be able to use that code for the_content_limit.

  3. tomasi514
    Posted 7 years ago #

    Thanks a lot Michael, I have to say, I already found this page with google but did not consider it as I should due to the post date 2005.
    Thanks for keeping me up-to-date, I am only 3 years late lol ;-)

  4. tomasi514
    Posted 7 years ago #

    That works perfectly with the code I posted above, once again thanks Michael!

Topic Closed

This topic has been closed to new replies.

About this Topic