Forum Replies Created
-
AuthorPosts
-
October 10, 2013 at 2:17 am in reply to: Placing a footer banner above footer widgets, how is this? #66088
Rusty
MemberThank you Brad. That is a much better (and more elegant) solution thanI came up with.
I do now remember wondering if there was a way to prioritize the order in which elements are displayed...
Rusty Eddy
October 8, 2013 at 9:32 am in reply to: Placing a footer banner above footer widgets, how is this? #65844Rusty
MemberThanks for the response Brad!
My main objective wasn't so much to add the sidebar widget (I've done that plenty of times). It was to figure out how to get my new widget area above the footer widget area. So I tried to keep the code in the original post simple without the distraction of the sidebar widget code.
If I use the code above it will place my "footer banner" in the incorrect order, under the footer widgets, before the footer.
So, the only way I have been able to figure out how to get the banner above the widget area is to remove the "genesis_footer_widget_areas()', create my own hook, and then call the "genesis_footer_widget_areas()" after printing the banner in the new hook.
It works, so I guess it'll be fine.
Any way, here is the final code:
/* * ------------------------------------------------------------------------- * Create the widget area to span the width of the site above the * footer. */ $lpo_footer_banner = array( 'id' => 'footer-banner', 'name' => __( 'Footer Banner', 'Lake Park' ), 'description' => __( 'Footer Banner above widgets', 'Lake Park' )); genesis_register_sidebar( $lpo_footer_banner ); /* * Remove the existing genesis before footer hook because we are going * to replace it with our own. Otherwise we'll end up with our banner * below the footer widet area. * * We'll then call the footer widget hook after we summons our footer * banner. */ remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); add_action( 'genesis_before_footer', 'lpo_do_footer_banner' ); /* * Just do it. */ function lpo_do_footer_banner() { /* * Draw the footer banner if we have placed any widgets. */ if ( is_active_sidebar( 'footer-banner' ) ) { $do_widget = array ( 'before' => "<div class='lpo-footer-banner'><div class='wrap'>", 'after' => "</div><!-- wrap --></div><!-- lpo-footer-banner -->", ); genesis_widget_area( 'footer-banner', $do_widget ); } /* * Now draw the footer widgets */ genesis_footer_widget_areas(); }
The github link if anybody is interested: https://gist.github.com/rustyeddy/6856424
Rusty Eddy
Rusty
MemberI understand the impatience, I am in the same boat, can't wait and I have 3 active projects that I just went with G1.9 because I have to get them out there. .
However, you have to understand that developing and delivering a software product is much more complex than many other things, like say building a website.
WP3.6 comes out, I'm sure they have a whole suite of tests to run through, last minute fixes to answer for last minute changes in WP3.6. You simply can not predict these things.
OTOH: if they were to pull the trigger too quickly with a little glitch here, or a needed tweak there, then sure enough the forum will explode with questions and bug reports, and complaints about it not being ready.
It is a tough balance (be thankful we're not dealing with M$oft)
I keep checking my email just waiting for the announcement, like a kid waiting for the mailman to deliver a birthday present.. I know the wait will be worth it. I know in September or October I'll look back and an extra week or two of waiting will be well worth it.
I am personally grateful to get such an insane value for more than a reasonable price..
BTW - When did they say it'll be coming out? đ
Rusty Eddy
Rusty
MemberVery nice I love it. Â Clean and easy to read!
Rusty Eddy
Rusty
MemberThanks John!!
It was the '!important', that did the trick.
Now I know why I have seen '!important' around.  I just did a little extra research, I have a much better understanding of selectors, inheritance and specificity!
Thanks a ton!
Rusty Eddy
-
AuthorPosts