Length of WordPress Excerpt

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2419 Reply

    Deonna

    Love the theme – wondering if there’s a way I can make the excerpt post box larger to contain more words from the post? Thanks!

    #2420

    Ron
    Keymaster

    You can add this code in functions.php

    function ast_excerpt_length( $length ) {
       return 120;
    }
    add_filter( 'excerpt_length', 'ast_excerpt_length' );

    By default WordPress outputs 55 words for excerpts. The code above increases it to 120 words. You can change the number as you like. The box should expand automatically.

    #2728

    Anonymous

    Is there anyway to force justify the text of the excerpt?

    #2730

    Ron
    Keymaster

    Add this on the Custom CSS tab of the Asteroid Options. Or you could add it on a style.css if you are using a child theme.

    .entry-excerpt {
        text-align: justify;
    }
    #2733

    Anonymous

    And will the size of the image expand too?

    #2734

    Ron
    Keymaster

    No, that just justifies the text on the excerpt.
    You can add this code on Custom CSS and make the thumbnails a bit bigger but not much.

    .blog-view .entry-thumbnail {
        height: auto;
        width: auto;
    }
Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Length of WordPress Excerpt
Your information: