Hi There,
I'm trying to create a footer navigation on the inside pages of a site, and removing the footer subsidiaries which are active on the homepage. I want to keep the 3 footer subsidiaries on the homepage only, and on the inside pages I'd like to remove then and replace them with a footer navigation. My basic PHP skills and understanding of hooks and filters are most of my problem! ANy help would be greatly appreciated as well as any major no-no's I'm committing here in the following code. This is what I've got
// function to remove subs
function remove_thematic_subs() {
remove_action('thematic_footer','thematic_subsidiaries', 10);
}
//Creating SC footer nav
function sc_footer_nav() {
?>
<div id="footerNav">
<ul>
<?php wp_list_pages('title_li='); ?>
</ul>
</div>
<?php
}
// If Statement to determine which page to remove Subs from
function footer_swap() {
// We test if we are on the page front page
if (is_front_page()) {
// Yes, we are .. now we leave the subs instact
return NULL;
}
else {
// we are not .. we turn the subs off and add footer nav
return add_action('init','remove_thematic_subs');
add_action('thematic_footer', 'sc_footer_nav');
}
}
// execute removing the subs
add_action('init','footer_swap');