Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #301103


    I’m using custom layout for blog page (which is fontpage and blog page).
    How can I edit the excerpt lenght?

    I’ve tried adding the following code in theme functions.php without success.

    add_filter('excerpt_length', 'my_excerpt_length');
    function my_excerpt_length($len) { return 75; }

    Thank you best regards,


    Hey gmarco!

    Thank you for using Enfold.

    You can edit includes > loop-index.php, find this code on line 186:

    echo $content;

    Replace it with:

    if(!is_single()) { echo  wp_trim_words( $content, 10 ); } else {
    				echo $content;

    Increase the value 10 if necessary.

    Best regards,


    Ok that works but I would like to display “Read more” link or custom button also.

    Is it possible to vary excerpt lenght depending on where you place “read more” separator on post.

    I mean set default excerpt value with custom function. Apply it if not “read more” separator defined.
    If read more separator defined show text until read more.

    In both cases display read more button/link to full content :)

    • This reply was modified 1 year, 2 months ago by  gmarco.


    The read-more tag should work when you use this setting:



    I’m finally not using a custom page. Just let the theme display blog. It works better for me.

    However on default blog I can’t edit excerpt length or add Read more link.



    To insert a Read More link in the post content you have to enter


    in the text of the content, where you want to display it.

    Have a look at

    and the sections

    Modify The Read More Link Text


    Displaying a “more…” link when using the the_excerpt()

    for more information how to customize.

    Best regards,

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.