Tagged: custom.css, page-id
Hi there, does anyone know a way to output custom page IDs, so that custom CSS styles can be applied to certain pages? For example I want my home page to have a taller header area. I can use the current id of “page-id-17”, but it would be more elegant to be able to use an id like “home”. I have tried adding this to the header but no luck.
<?php if (is_front_page()) { ?>
<body id=”Home”>
<?php } else { ?>
<body id=”<?php echo strtolower(str_replace(‘ ‘, ”, wp_title(”, false)));?>”>
I have to stress I’m not a developer, I’m a designer, so much of my coding is copy/paste trial and error.
Hi Glyphism!
Have you tried using .home?
Cheers!
Josue
I just did and it worked. thanks!