tags:

views:

14

answers:

1

Hi all,

I customised my theme where the index.php works as a "page". But with <body <?php body_class(); ?>> it's create the class "blog", which I don't want to. I want to change the class name to "index" or "home. How can I do this?

Thanks.

A: 

The body_class() function accepts several parameters. The classes are restricted to the defaults listed, but I think you could filter it in your theme's function.php file and let "body" out.

After checking out the source code, I'm not really sure if you can leave it out. It's sort of hard-coded, you should filter get_body_class() maybe (if possible).

Check the link to read more about it.

Fernando
Thanks. I checked the link.I know you can write your own function at functions.php and replace the original one. But I would like to use a filter and stick with the original. But it's seem that is not possible to do it. :-)
Old Castle