Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to remove footer widgets from front page?
Tagged: footer widgets remove_action
- This topic has 4 replies, 3 voices, and was last updated 12 years, 5 months ago by
Davinder Singh Kainth.
-
AuthorPosts
-
February 10, 2014 at 7:44 am #89642
MrNerdy
MemberI am using the 3 footer widgets, which I moved outside the structural wrap:
//* Reposition the footer widgets outside the wrap remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); add_action( 'genesis_after', 'genesis_footer_widget_areas' );I would like to remove the footer widgets from the front page only, which I unsuccesfully tried to achieve with the following code:
//* Remove footer widgets from front page add_action( 'genesis_after', 'remove_footer_widgets' ); function remove_footer_widgets() { if ( is_front_page()) remove_action( 'genesis_after', 'genesis_footer_widget_areas' ); }The footer widgets are still visible on the front page. Any idea how to get this working?
February 10, 2014 at 7:56 am #89648chillybin
MemberThis should help
//* Remove footer widgets from front page add_action( 'genesis_after', 'remove_footer_widgets' ); function remove_footer_widgets() { if ( is_front_page() || is_home()) { remove_action( 'genesis_after', 'genesis_footer_widget_areas' ); } }
We are a web design & development consultancy based in Singapore who specialise in all things WordPress & Genesis. | ChillyBin Web Design & Consultancy: http://www.chillybin.com.sg | Twitter: @chillybindesign
February 10, 2014 at 8:04 am #89654MrNerdy
MemberUnfortunately this did not work either, but I just found the mistake. The function has to be called at the original footer widget location, i.e.:
//* Remove footer widgets from front page add_action( 'genesis_before_footer', 'remove_footer_widgets' ); function remove_footer_widgets() { if ( is_front_page() || is_home()) { remove_action( 'genesis_after', 'genesis_footer_widget_areas' ); } }February 10, 2014 at 8:07 am #89655chillybin
Member//* Remove footer widgets from front page if ( is_front_page() || is_home()) { remove_action( 'genesis_after', 'genesis_footer_widget_areas' ); }
We are a web design & development consultancy based in Singapore who specialise in all things WordPress & Genesis. | ChillyBin Web Design & Consultancy: http://www.chillybin.com.sg | Twitter: @chillybindesign
February 10, 2014 at 8:12 am #89660Davinder Singh Kainth
MemberTry this code:
//* Remove footer widgets from home - basicwp.com add_action( 'genesis_before', 'basicwp_footer_widgets' ); function basicwp_footer_widgets() { if( !is_front_page() ) return; remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); }
Sunshine PRO genesis theme
Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis Themes -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.