WordPress.org

Ready to get started?Download WordPress

Forums

Filter for the_excerpt? (3 posts)

  1. Anonymous
    Unregistered
    Posted 10 years ago #

    Filter for the_excerpt?

  2. eVilwayz
    Member
    Posted 10 years ago #

    Gah - hit return, and posted way too early.
    I'm running a test weblog, and needed to have the_excerpt unformated. I ended up deleting this line
    add_filter('the_excerpt', 'wpautop');
    from vars.php.
    I was wondering if anyone can put together a quick filter for the my-hacks.php file to do this.
    I'm still a php rookie, hence me asking. Slowly learning though.
    Thanks in advance for any help.

  3. Nick Momrik
    Member
    Posted 10 years ago #

    I think they've been working on some code to remove filters, which would probably be what you would use in this case.
    I just did a quick search and there is a remove_filter function in the latest code for 1.1-beta. It can be found in functions.php.
    I think what you would need to do is place this in your my-hacks.php file:
    remove_filter('the_excerpt', 'wpautop');
    I've never used it myself...maybe someone else has and can verify.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.