ThemeShaper Forums » Thematic


Custom Front Page - Main Background Hide

(3 posts)
  • Started 12 years ago by lukegw
  • Latest reply from lukegw
  • This topic is resolved
  1. Hi guys, this is my first post on TSF, although I have regularly used it to learn development of child themes.

    I have taken a little bit of time out of developing and coming back to it I need to get more refreshed, but with little time.

    My problem is that on my custom front page, I need to insert a "background: none" style to div#main as I am using faux backgrounds throughout the site, although it is just not needed on the custom front page.

    I do not believe this can be done through an IF function on the frontpage.php as i am sure that Main is nested within thematic_abovecontainer... but I don't know how to edit the action in such a way in functions.php to achieve what I want.

    Should be an easy job I reckon... Its just that I need to get refreshed aha

    Thanks for any help guys!

    Posted 12 years ago #
  2. I've since figured that div#main is inside get_header() as it is clearly in the header.php file (DOH!)

    This is something I've tried but with no success: (probably lack of understanding)

    function frontpage_main($no_main_bg) {
    if (is_front_page() ) {
    $no_main_bg = '<div id="main" style="background: none;">';

    Posted 12 years ago #
  3. LOL after all that... did i or did I not say.. needing to get refreshed...

    the solution was an if function in the header.php of my child theme, or rather edit the one i had done before... but for solutions sake...

    <?php if (is_front_page() ) { ?>
    <div id="main" style="border: none; background: none;">
    <?php } else { ?>
    <div id="main">
    <?php } ?>

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.