I know that this is the function/part that I need to change but everything that I tried to change doesn’t get me to far. I just need to get a link/url to the original post instead of the […] just in the RSS/feed
* Overrides default excerpt handling so we have more control
*
* @since 1.2.4
*/
remove_filter('get_the_excerpt', 'wp_trim_excerpt');
add_filter('get_the_excerpt', 'improved_trim_excerpt');
function improved_trim_excerpt($text) {
// Set allowed excerpt tags
$allowed_tags = (pagelines_option('excerpt_tags')) ? pagelines_option('excerpt_tags') : '<p><br><a>';
$raw_excerpt = $text;
if ( '' == $text ) {
$text = get_the_content('');
$text = strip_shortcodes( $text );
$text = apply_filters('the_content', $text);
$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text); // PageLines - Strip JS
$text = str_replace(']]>', ']]>', $text);
$text = strip_tags($text, $allowed_tags); // PageLines - allow more tags
$excerpt_length = apply_filters('excerpt_length', 45);
$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');
$words = preg_split("/[\n\r\t ]+/", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);
if ( count($words) > $excerpt_length ) {
array_pop($words);
$text = implode(' ', $words);
$text = $text . $excerpt_more;
} else {
$text = implode(' ', $words);
}
}
return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);
}