Support » Theme: WP-Forge » Excerpts don't works

  • Resolved ddorr



    I wonder if last version of wp 4.2.2 cause a bug in the excerpts in homepage. I set on “Show full post or excerpt?” = excerpt, but it does not works. I use a childtheme made with wp starter and wp 4.4.2.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author ThemeAWESOME


    Hey there,

    Thanks for using WP-Forge. YOu say something doesn’t work but do not provide a link for me to look at and you do not list any other details like plugins you may be using etc.

    Do you have a link that I can look at? The reason I ask is that my site is running 4.4.2, WP-Forge and WP-Starter and excerpts work fine. You can see them in action here:

    How about plugins? What plugins are you using?


    Thanks for comment. This is a site in localhost. but anyway I found the issue. It was a function for get active links in excerpt. I replaced by this:

    function new_wp_trim_excerpt($text) {
      $raw_excerpt = $text;
      if ( '' == $text ) {
        $text = get_the_content('');
        $text = strip_shortcodes( $text );
        $text = apply_filters('the_content', $text);
        $text = str_replace(']]>', ']]>', $text);
        $text = strip_tags($text, '<a>');
        $excerpt_length = apply_filters('excerpt_length', 55);
        $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');
        $words = preg_split('/(<a.*?a>)|\n|\r|\t|\s/', $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY|PREG_SPLIT_DELIM_CAPTURE );
        if ( count($words) > $excerpt_length ) {
          $text = implode(' ', $words);
          $text = $text . $excerpt_more;
        else {
          $text = implode(' ', $words);
      return apply_filters('new_wp_trim_excerpt', $text, $raw_excerpt);
    remove_filter('get_the_excerpt', 'wp_trim_excerpt');
    add_filter('get_the_excerpt', 'new_wp_trim_excerpt');

    Thanks again.

    Theme Author ThemeAWESOME


    Awesome, glad you got the issue corrected. If possible, please leave a rating and review and let everyone know how awesome WP-Forge is.

    Thanks again.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Excerpts don't works’ is closed to new replies.