Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter czonex

    (@czonex)

    i used the following code and it works fine on my local server but gives an error on my hosting server …. using the same WP version on both places

    function custom_excerpt($new_length = 20, $new_more = '...') {
      add_filter('excerpt_length', function () use ($new_length) {
        return $new_length;
      }, 999);
      add_filter('excerpt_more', function () use ($new_more) {
        return $new_more;
      });
      $output = get_the_excerpt();
      $output = apply_filters('wptexturize', $output);
      $output = apply_filters('convert_chars', $output);
      $output = '<p>' . $output . '</p>';
      echo $output;
    }
    Thread Starter czonex

    (@czonex)

    Hi kuldeepd,

    I can use but my client can not, the post page would include DIVs and other tags

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