wpbook shorter blog length (3 posts)

  1. ucfknight04
    Posted 5 years ago #

    How can I make the posting length less, so people have to go to my blog to read the rest of the post. I can't use excerpt, because I use my feed for a email list that need the whole post. I read it was the first 1000 characters, how do I changed that to 200 without having to use excerpt?


  2. BandonRandon
    Posted 5 years ago #

    You can modify the code in theme/index.php to just get the first 200. You'd need to write a custom PHP function.

    You can try to replace the_content() with something like this

        $paragraphsShow = 2; // shows first two paragraphs
        $content = apply_filters('the_content', get_the_content());
        $content = explode("</p>", $content);
        $max = (count($content) < $paragraphsShow) ? count($content) : $paragraphsShow;
        for ($i = 0; $i < $max; $i++) {
            echo $content[$i] . "</p>";

    This gets the first 2 paragraphs you should be able to edit $ParagrahsShow to the number of Paragraphs you want to show. Not sure if it'll work found it on the web but the logic is the same

    Source: http://www.webhostingtalk.com/showthread.php?t=998755

  3. John Eckman
    Posted 5 years ago #

    Posting length where? On the FB wall, where the excerpt gets posted?

    On the tab view?

    On the canvas page list view?

    On the canvas page individual post view?

    Each of these has different answers, I think.

Topic Closed

This topic has been closed to new replies.

About this Topic