Remove Footer widgets but not on custom template
-
Hi,
I made some code to remove the footer widgets on a custom template page I made. The code worked well but removed them on every page. Here’s the code:
<?php add_filter('tc_widgets_footer','my_footer_widget_removal'); function my_footer_widget_removal($default_widgets_area){ if ( ! is_page_template( 'custom-template-page.php' ) ) return; remove_action('__footer', array(TC_init::$instance, 'footer_widgets'), 10); } ?>
Would someone know how to limit the removal of the footer widgets ONLY to the custom template page?
Thanks so much for the help! It’s appreciated!
Michael
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Remove Footer widgets but not on custom template’ is closed to new replies.