WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Excerpt
Strip all HTML tags (5 posts)

  1. urbanty
    Member
    Posted 2 years ago #

    Hi,

    I am aware that keeping the HTML tags it is one highlighted feature of this plugin, but I need them to be stripped. Is there are way to just strip all? allowed_tags seems to have the option "_all", but when I tried this for exclude_tags it didn't seem to work.
    Strangely, trying to strip hyperlinks also didn't work when I manually set "exclude_tags=a".

    Thanks in advance!

    http://wordpress.org/extend/plugins/advanced-excerpt/

  2. Xavien
    Member
    Posted 2 years ago #

    Hi urbanty,

    I'm not sure about exclude_tags, I'm currently working on wordpress 3.31 and the_advanced_excerpt version 4.1.1, I did take a quick look in the plugin script, it seems like exclude_tags is not in the array anymore? or I might be wrong. But, this is the way that I found out how to filter the html tags. You can use allowed_tags and put in the tags you want to display your excerpt.

    <?php the_advanced_excerpt("length=20&allowed_tags=p,a"); ?>

    Hope this information helps ;)

    Cheers,
    Xavien

  3. urbanty
    Member
    Posted 2 years ago #

    Hi Xavien,

    thanks for your reply.
    I tried you suggestion, but didn't have success. In fact, I realized that the my custom settings when calling the plugin is apparently completely ignored.

    It looks like this:
    the_advanced_excerpt('length=50&no_custom=0&no_shortcode=1&finish_sentence=1&add_link=0&allowed_tags=em,i,u,b,strong');

    Any ideas what's wrong?

  4. brasofilo
    Member
    Posted 2 years ago #

    allowed_tags is working for me, exclude_tags not :(

    WP 3.3.1
    AE 4.1.1

  5. motocomdigital
    Member
    Posted 1 year ago #

    exclude tags only works for me if I put this in my functions...

    remove_all_filters('the_excerpt');

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic