• ucfknight04

    (@ucfknight04)


    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?

    Thanks,
    Ryan

Viewing 2 replies - 1 through 2 (of 2 total)
  • B.

    (@bandonrandon)

    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

    <?php
        $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: https://www.webhostingtalk.com/showthread.php?t=998755

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wpbook shorter blog length’ is closed to new replies.