Horje
Excerpts (being able to edit and get rid of hyperlinks) - Wordpress Solution
[Solved] - Excerpts (being able to edit and get rid of hyperlinks) - Wordpress Solution
Try following codes
If you have a look at my home page (http://squittybubbler.com/) and blog (http://squittybubbler.com/blog/) you'll notice that we have hyperlinks in the excerpts. We want to stop this! Is there a simple way to stop this?

Solution - 1

Add following lines to your theme's functions.php file:

function my_clean_the_excerpts($excerpt) {
  $excerpt = strip_tags( $excerpt, '<p>' );
  return $excerpt;
}
add_filter('the_excerpt', 'my_clean_the_excerpts');


Solution - 2

Steven, can you please paste the code for that page? It seems you already have an excerpt filter in place in your functions.php. Also, please take a look at this plugin: http://wordpress.org/extend/plugins/advanced-excerpt/. I have it in my blog and it seems it does exactly what you wanted to achieve.

Date: 2022-10-21 05:19:38
Category: Wordpress
More for You