Site logo

Archived topic

Change excerpt length with Elementor

3 replies · Started by Roberto Tarzia on October 2, 2019

Viewing posts 1–4 of 4

hi, i'm trying to change the length of the excerpt, but the value entered with elementor is ignored.

I read other topics with the same problem, I tried to add the recommended codes but it's not working, maybe I'm wrong.

I tried these:

add_action( 'after_setup_theme','tu_change_excerpt_length' );
function tu_change_excerpt_length() {
    remove_filter( 'excerpt_length', 'generate_excerpt_length', 999 );
    remove_filter( 'excerpt_length', 'generate_excerpt_length', 20 );
    add_filter( 'excerpt_length', 'generate_excerpt_length', 15 );
}
add_action( 'after_setup_theme', 'tu_remove_blog_filters' );
function tu_remove_blog_filters() {
    remove_filter( 'excerpt_length', 'generate_excerpt_length', 15 );
    remove_filter( 'excerpt_more', 'generate_blog_excerpt_more', 15 );
    remove_filter( 'the_content_more_link', 'generate_blog_content_more', 15 );
}

Thanks for your help

Hi there,

what happens if you deactivate the GP Blog module in Appearance > GeneratePress?

Hmm I don't think GP would overwrite Elementor's setting especially the blog add-on is not activated.

Is the Elementor excerpt working normally if you switch to a twenty series WordPress theme temporarily?

Let me know :)

This archived topic is closed to new replies.