ThemeShaper Forums » Power Blog

[closed]

Make function in functions.php display only if is front_page

(3 posts)
  1. I need to only display the 3 leader asides (and a custom function) on the front_page.

    I used Widget Logic, but it only removes the widgets, not the leader div and its borders.

    So I tried to place if is_front_page() on several spots in my functions.php, but somehow I have not find the right location. Someone has a map for me? ;)

    This is the custom function (you know the asides code I guess)

    // Adds the Partner div above the footer
    function childtheme_partnerlinks() { ?>
         <div id="partner">
    	      <div id="partnerinfo">
    
    	      ...Bla...Bla...Bla...
    
    	      </div>
    	  </div>
    <?php }
    add_action('thematic_abovefooter','childtheme_partnerlinks');
    Posted 4 years ago #
  2. This CSS fixes the leader div to be not displayed (except on the front page)

    body.singular #leader,
    body.category #leader,
    body.search-results #leader {
        display:none;
    }
    body.home #leader {
        display:inherit;
    }

    but I would prefer some if_front_page magic for the functions.php to get rid of that extra plugin.

    Posted 4 years ago #
  3. curobs
    Member

    Warning. This fix causes the leader to disappear on home page in IE7. Better to go with Chris' solution at http://forums.themeshaper.com/topic/thematic-feature-site-filter-out-leader-on-all-but-home#post-7245

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.