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


    Sorry if this is not a support question as such, just kinda stuck.

    I would like to add a background shadow image to the “main” section on the internal pages – please see basic mock up here: . As you can see, the image is there and repeated as I’d hoped, just needs tweaking to fit dimensions etc. But by adding this detail to “main” CSS I’m also left with the same effect on the home page outside of the post area. This is a side effect that I would like to avoid please. Is there anyway to get around this? Ie have the background effect only on main (internal) not main (home page)

    Hope that makes sense?

    NB. This mock up is only temporary to show you the problem, this is not a “live” URL. Am only using your theme on one site as per the license.

    Many thanks in advance




    You can adjust the body tag in header.php to add an ID for subpages (currently the tag only adds an ID for the homepage). This will allow you to set CSS which will only be parsed on subpages.

    Open up header.php and find this code:

    $frontpage = " id='frontpage' ";

    <body <?php if($frontpage){echo $frontpage;} ?>>

    Change it to:

    $body_id = is_front_page() ? 'frontpage' : 'subpage'; ?>

    <body id="<?php echo $body_id; ?>">

    You can then add CSS specific to subpages by prefixing the style with #subpage.



    Hi James

    Thanks for the info, worked a treat as you can see by following links above, however my slider vanished after changing the Header.php. Any ideas how to get it back?

    Thanks again


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

The topic ‘Editing "Main" CSS only on internal pages’ is closed to new replies.