Unable to use functions.php in child theme
-
I am trying to set up a custom body tag for a single page so I can center some text. Most of the (rather ridiculously complex) ways to do this involve creating a function. However, each time I copy out the functions.php and try to edit it, my site goes blank. Using a child theme of course, but this doesn’t seem to matter.
Code I am trying to add to functions.php
add_filter( ‘body_class’, ‘my_neat_body_class’);
function my_neat_body_class( $classes ) {
if ( is_page(8891) )
$classes[] = ‘negodniki-class’;
return $classes;
}In case you are wondering, I tried setting up custom CSS in the theme, and on the page via WP admin dashboard and none of that worked with this theme.
.negodniki-class body, textarea {
font: normal normal normal 18px “Droid Sans”, serif;
text-align: center;
color: #120;
}The page I need help with: [log in to see the link]
- The topic ‘Unable to use functions.php in child theme’ is closed to new replies.