This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

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

Open 1 reply themetheme-origami
11 years ago · Last reply by Andrew Misplon 11 years ago

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.

Need fast email support? Get SiteOrigin Premium

Replies

1
  1. Andrew Misplon Staff 11 years, 6 months ago

    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.

Have a different question or issue?

Start New Thread