• Resolved lschoen114

    (@lschoen114)


    I am having issues with editing the length of the excerpt on the home page.

    I went to the standard.php page and edited the

    <?php
            $excerpt = get_the_excerpt();
    	if (has_excerpt()) {
    		the_excerpt();
    	} else {
    		echo duena_string_limit_words($excerpt,85);
    			}
    			?>

    But It does not seem to increase the length of the excerpt. All it did was add “[…]” after the excerpt.

    I am very skilled with development, but I am not an expert on wordpress.

    Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi.

    It’s occurs because you exceed standart wordpress excerpt length. So you need to increase default excerpt length.

    Add the below code in your functions.php

    function new_excerpt_length($length) {
        return 200;
    }
    add_filter('excerpt_length', 'new_excerpt_length');

    Increase the count as per your wish.

    Thread Starter lschoen114

    (@lschoen114)

    That works great! I did both of those solutions separately, but did not think to do them together.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Issues with editing Excerpt’ is closed to new replies.