[Support request] change the number of characters on excerpt from articles

Premium WordPress Themes Forums Envy Blog change the number of characters on excerpt from articles

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2420
    Yukari
    Participant

    Can I change the number of characters or number of lines on excerpt from articles, index page.(div name is “entry-content”)

    should i change PHP file?
    what file and where should i change?now it shows around 18 characters.

    i want to show about 3lines or more 50 caracters.

    #2432
    Rabindra Tharu
    Participant

    Hi, @Yukari

    Well, this feature is available in our premium version of the theme.

    Please feel free to implement in any theme but we suggest to make a child theme and do it.
    Follow this article :- https://codex.wordpress.org/Plugin_API/Filter_Reference/excerpt_length

    Thanks!

    #2450
    Yukari
    Participant

    Thank you!
    I changed the below file
    ==>>(layouts/blog/blog-layout-1.php)

    <?php
    $content = wp_trim_words( get_the_excerpt(), 18, ‘…’ );
    echo ‘<p>’.wp_kses_post( $content ).'</p>’;
    ?>

    I could change the number of characters for 90 caracters.

    #2456
    Rabindra Tharu
    Participant

    Hi, @Yukari

    Nice know that you figured out the solution.

    Note:- By changing the theme files directly without making a child theme, it coz the problem while updating the theme in features.

    Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.