• Around line 273 of wpseo-functions.php we can find this:

    '%%excerpt%%' => ( ! empty( $r->post_excerpt ) ) ? strip_tags( $r->post_excerpt ) : wp_html_excerpt( strip_shortcodes( $r->post_content ), 155),

    Please make this length (currently 155) user defined, so anyone can change this value.
    I’m getting better results using 200 to 300 chars long meta description and I have to change this manually on the php code each time I upgrade the plugin.

    https://wordpress.org/plugins/wordpress-seo/

Viewing 1 replies (of 1 total)
  • for WP SEO by Yoast 2.0.1
    wordpress-seo/inc/class-wpseo-replace-vars.php
    if ( ! empty( $this->args->ID ) ) {
    if ( $this->args->post_excerpt !== ” ) {
    $replacement = strip_tags( $this->args->post_excerpt );
    }
    elseif ( $this->args->post_content !== ” ) {
    $replacement = wp_html_excerpt( strip_shortcodes( $this->args->post_content ), 155 );
    }
    }

Viewing 1 replies (of 1 total)
  • The topic ‘Make generated %%excerpt%% length user-defined’ is closed to new replies.