• My website uses child theme of graphene. I create my own search result display template for my website. In this template, I use the_excerpt() to display excerpt of each searched items (including posts and pages). In addition, when I add new posts and pages, I insert ‘More tag’ (<!–more–>) at the same time. but the search results does not stop at ‘cut-off’ point and the excerpt length is more than 55. To fix the problem, I put follow code in function.php of my child theme:
    function custom_excerpt_length( $length ) {
    return 50;
    }
    add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 );

    but it sounds not work. Is there graphene setting for this?

    However, for the graphene default search, I got correct result display, which cuts off at the point of ‘more tag’.

    I later try to replace the_excerpt() with the_content(), but the search result display is also not correct with my search result template.

    who know the problem?
    If I would like to remove ‘Continue reading’ or ‘Read more’,how should I do?

    Thanks.

The topic ‘change excerpt length’ is closed to new replies.