[wp-hackers] How to remove captions on the homepage
Alex Hempton-Smith
hempsworth at googlemail.com
Wed Jan 14 14:28:35 GMT 2009
> You could use CSS to hyde the captions though they would still be
> there in the html output.
Thanks Mike, I'm doing that at the moment and although it works it means the
HTML is all cluttered when it shouldn't be. Also, won't be very nice with
CSS disabled or screenreaders etc.
Any other options people know of?
-- Alex
On Wed, Jan 14, 2009 at 2:25 PM, Mike Little <mike at zed1.com> wrote:
> 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
> --
> Mike Little
> http://zed1.com/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list