Community Forums › Forums › Archived Forums › Design Tips and Tricks › Agency 2.0 Footer Widgets
- This topic has 3 replies, 2 voices, and was last updated 10 years, 10 months ago by Smarty.
-
AuthorPosts
-
January 29, 2014 at 1:39 pm #87717rjdcreativeMember
Does anyone know a way to have the content in the home page Footer 1 widget span across the Footer 2 widget in the Agency 2.0 theme? And also how to have the footer widgets appear on the home page only? Is there some code I can add to the Theme Functions file (or style.css?) to accomplish this?
http://s507547076.onlinehome.us/
Thanks in advance,
http://s507547076.onlinehome.us/
BobJanuary 29, 2014 at 5:50 pm #87749SmartyMemberHi Bob,
In your functions.php
To remove footer from entire site except homepage try;
add_action( 'genesis_before', 'pas_remove_footer_exclude_home' ); function pas_remove_footer_exclude_home() { if( !is_home() ) { remove_action('genesis_footer', 'genesis_do_footer'); remove_action('genesis_footer', 'genesis_footer_markup_open', 5); remove_action('genesis_footer', 'genesis_footer_markup_close', 15); }}
To remove footer & footer widgets from entire site except homepage try;
add_action( 'genesis_before', 'pas_display_footer_home' ); function pas_display_footer_home() { if( !is_home() ) { remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); remove_action('genesis_footer', 'genesis_do_footer'); remove_action('genesis_footer', 'genesis_footer_markup_open', 5); remove_action('genesis_footer', 'genesis_footer_markup_close', 15); }}
Hope this helps.
Paul
(Thanks to Brad Dalton for the original code above)
Web Design, Development & Consultancy
Being The Best He Can Be! | http://www.paul-smart.co.uk
January 30, 2014 at 1:17 pm #87863rjdcreativeMemberHi Paul, thanks so much for your help -- I'm getting an error on this line:
function pas_display_footer_home() {
And also the last line:
}}
Am I doing something wrong?
And do you (or anyone else?) know a way to make the content in the home page Footer 1 widget span across the Footer 2 widget?
Thanks again!
BobJanuary 31, 2014 at 5:28 am #87934SmartyMemberHi Bob,
Apologies for the delay.
I am not sure why it's not working for you, I have tested the code on a dev site and it works fine. Try it again, or have you made any other changes to your functions.php that may be causing the issue?
Regarding the footer, around line 74 of your functions.php change this;
/** Add support for 3-column footer widgets */ add_theme_support( 'genesis-footer-widgets', 3 );
To This;
/** Add support for 2-column footer widgets */ add_theme_support( 'genesis-footer-widgets', 2 );
Then in your styles.css, around line 1323 change;
.footer-widgets-1 { float: left; margin: 0 30px 0 0; width: 280px; } .footer-widgets-2 { float: left; width: 280px; } .footer-widgets-3 { float: right; width: 280px; }
To;
.footer-widgets-1 { float: left; margin: 0 30px 0 0; width: 560px; } .footer-widgets-2 { float: left; width: 560px; } /*.footer-widgets-3 { float: right; width: 280px; }*/
You might want to adjust width: 560px on footer-widgets-2 to suit your design and I would also suggest deleting footer-widgets-3 once you are happy as I have just commented it out for speed.
Finally, I would remove .footer-widgets-3, from lines 1656 & 1718 under Respeonsive Design.
All the best
Paul
Web Design, Development & Consultancy
Being The Best He Can Be! | http://www.paul-smart.co.uk
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.