WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. tomasi514
    Member
    Posted 5 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>
    <?php
    $lastposts = get_posts('category=7&numberposts=3');
    foreach($lastposts as $post) :
    setup_postdata($post);
    ?>
    <h2>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></h2>
    <?php the_content_limit(80, "read more ยป"); ?>
    <?php endforeach; ?>
    </div>

    Anybody can help me? Thanks!!

  2. MichaelH
    Member
    Posted 5 years ago #

    This search:
    http://www.google.com/search?q=wordpress+plugin+post+limit

    found this topic:
    http://www.bloggingpro.com/archives/2005/03/03/wordpress-plugin-limit-post/

    that pointed to this:
    http://labitacora.net/index.php?p=152

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

  3. tomasi514
    Member
    Posted 5 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
    Member
    Posted 5 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