Support » Fixing WordPress » Need html in widget excerpts

  • I’ve read several suggestions but I’m still having trouble trying to stop html tags from being stripped in my widget excerpts.

    Doesn’t seem to matter whether it’s manual or automatic excerpts. Any ideas?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael


    Forum Moderator

    what widget are you using to show the excerpts?

    It’s called “business page services widget” from the attitude theme. I’ve put in a forum request on the support for that theme but haven’t heard anything back.

    I see strip tag code for the title and byline but not for the text, so I don’t know why it’s stripping tags there. It does have code for stripslash but I wouldn’t think that would remove html code.


    This is probably the filter that is stripping the html. Any idea how to remove the filter or alter it to allow certain html?

    if ( current_user_can('unfiltered_html') )
    			$instance['text'] =  $new_instance['text'];
    			$instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed
    		$instance['filter'] = isset($new_instance['filter']);
    		return $instance;

    I removed “wp_filter_post_kses” in the statement and it seems to work fine with manual excerpt. It would be great if it could work with the automatic excerpt but I think I can live with this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Need html in widget excerpts’ is closed to new replies.