Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #196853

    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?



    I just did and it worked. thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Custom Home Page ID’ is closed to new replies.