Home>Support>How to trim the_content() to 100 words on loop (list posts)?

How to trim the_content() to 100 words on loop (list posts)?

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

Hello guys,
I like your theme especially origami pepper, I want to know how to trim the content for 100 words in post list and add Read more at the end? Thank you

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 10 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    Hi Kusnadhi

    We hope to have this resolved soon. Please head to Appearance > Editor and insert the following the bottom of your functions.php file. Do so carefully.

    function theme_child_fix_more(){
    if(is_front_page()) {
    global $more;
    $more = 0;
    }
    }
    add_action(‘template_redirect’, ‘theme_child_fix_more’);

    Then head to your home page and change the template from Blog if it was Blog to just Full Width or Default. Then click over to the Page Builder tab and insert the Post Loop widget.

    Ensure that your posts page is not set under Settings > Reading.

    This hotfix is working on my side. Hopefully it’ll work for you.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More