[wp-hackers] How to remove captions on the homepage

Mike Little mike at zed1.com
Wed Jan 14 14:25:29 GMT 2009

2009/1/14 Alex Hempton-Smith <hempsworth at googlemail.com>:
> Hi all,
> I'm trying to remove the [caption] shortcode stuff from any articles on the
> homepage, so that
> the <div class="wp-caption"> and all that it contains is not outputted
> on the homepage.
> I've seen this filter that can be used, and in my functions.php have the
> following:
> if (is_home()) {
> add_filter('disable_captions', create_function('$a','return true;'));
> };
> But that doesn't make any difference. Is there any way I can achieve this?

I believe that filter only prevents the captions being created in the
admin screens.

You  could use CSS to hyde the captions though they would still be
there in the html output.

Mike Little

More information about the wp-hackers mailing list