Hey guys, I'm creating a theme and have debug turned on.
I added: <?php body_class($class); ?> to my <body>
Now I'm getting this Notice on every page. Anything I can do to remove the notice?
Notice: Undefined variable: class in /Users/bdbolin/Desktop/MAMP/wp-content/themes/Oasis/index.php on line 2
class="page page-id-174 page-parent page-template-default">
Either define the variable, or turn error reporting for notices off.
Try changing it to <body <?php body_class(); ?>> instead.
@Christine - I think that worked! Thanks guys! Can you tell me how that's different than what I put? Like is there a different instance that mine would have worked better?
If you read the codex - http://codex.wordpress.org/Function_Reference/body_class
You'll see that $class, is optional & can be either an array of class names or a string with space-separated classes names. So it needs to be defined. I never use it and just let WordPress set the classes.