Community Forums › Forums › Archived Forums › General Discussion › Beautiful Pro Theme: Moving Footer Widgets To Another Hook?
Tagged: footer widgets, hook priority
- This topic has 7 replies, 3 voices, and was last updated 8 years, 7 months ago by
jbculp.
-
AuthorPosts
-
July 13, 2016 at 9:42 am #189401
ScottFromPA
MemberHey Guys,
I added a custom widget to the genesis_before_footer on all pages. When I add content to the Footer widgets, those widgets appear above my custom widget.
How can I move the footer widgets below it? Could it be that they are both using genesis_before_footer? Functions.php does show what the footer widgets are using for some reason. The only code for footer widgets is the following.
//* Add support for 3-column footer widgets add_theme_support( 'genesis-footer-widgets', 3 );
I can't find any add action to a hook for the footer widgets. Am I loosing my mind?
Any idea how to modify the hook locations for the footer widgets? Ultimately I think it would be best if the footer widgets were using genesis_footer
Maybe I could change the order of the two widgets somehow? I dunno.
Any page but my front shows the issue.
http://www.gridviper.com/pastiche/services/July 13, 2016 at 12:53 pm #189411Brad Dalton
ParticipantTry another hook for your custom widget.
Or
Add a 3rd parameter below 10 so it hooks in before the footer widgets which use the same hook
add_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
Or
Re-hook the footer widgets with a priority higher than 10
July 13, 2016 at 1:47 pm #189416ScottFromPA
MemberI think there's more than meets the eye here.
I've tried adjusting priority with zero joy. I think the footer widgets are hard coded into the theme. The theme is Beautiful Pro
Add_theme_support is the only function for the footer widgets. That's it. Below's the code.
add_theme_support( 'genesis-footer-widgets', 9 );
My custom widget looks like this.
genesis_register_sidebar( array( 'id' => 'contact-form-widget', //*unique ID 'name' => __( 'Contact Form Bottom', 'beautiful' ), 'description' => __( 'A full width area just above the footer front page only.', 'beautiful' ), ) ); //* Placing The Full Width Bottom Widget on FP only genesis_before_footer add_action( 'genesis_before_footer', 'sef_add_page_content', 2 ); //* Low priority numbers show up first function sef_add_page_content() { if ( !is_front_page() ) genesis_widget_area ('contact-form-widget', array( 'before' => '<div class="contact-form-bottom"><div class="wrap">', 'after' => '</div></div>', ) ); }
What does it mean when there's no "add_action" for the footers?
Unfortunately reassignment to another hook is not an option. But thanks for the help.
July 13, 2016 at 2:22 pm #189419Brad Dalton
ParticipantWhen i test in the Genesis sample theme it displays before the footer widgets.
July 13, 2016 at 2:28 pm #189420Brad Dalton
ParticipantAnd also in Beautiful Pro, it displays before the footer widgets so you must have some additional code which is effecting this.
July 15, 2016 at 12:24 pm #189544ScottFromPA
MemberBrad,
It was me. I screwed up the syntax.
I needed to hear that it was my oversight.
All fixed. Thanks man.
July 15, 2016 at 12:27 pm #189545Brad Dalton
ParticipantSeptember 3, 2016 at 3:28 pm #192551jbculp
ParticipantBrad, once again you've saved the day... ScottFromPA, thanks for asking in a few words what I was going to ask in an essay.
I'm using Minimum Pro and have the exact same request with some slight variations. In my case, I moved the SiteTagline Call to Action in Minimum Pro down the page. I wanted it outside of Site Inner and before the Footer Widgets. The reply form Brad got me where I needed to go. So in case others have this issue, here is what I did. If there is a cleaner way, please let me know.
1. First I moved the true footer (copyright etc. ) down to the genesis_after section.remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); remove_action( 'genesis_footer', 'genesis_do_footer' ); remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); add_action( 'genesis_after', 'genesis_footer_markup_open', 11 ); add_action( 'genesis_after', 'genesis_do_footer', 12 ); add_action( 'genesis_after', 'genesis_footer_markup_close', 13 );
2. I relocated my site tagline to the genesis_before_footer area.
add_action( 'genesis_before_footer', 'minimum_site_tagline' );
3. Then using the info in this post I moved the footer widgets. I too was looking all over for a place in functions.php or front-page.php that addressed these widgets and all I found, like ScottFromPA, was the one block of code:
//* Add support for 3-column footer widgets add_theme_support( 'genesis-footer-widgets', 3 );
In my failed attempts I thought the 3 a priority so set it to 30, only to find I had 30 widgets named Footer Widget.
Brad gave the clue by naming the item 'genesis_footer_widget_areas' which I would have never figured out and don't know if the _areas part follow a known syntax and I just don't get it.Final working part for me here was this:
//* Add support for 3-column footer widgets add_theme_support( 'genesis-footer-widgets', 3 ); remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas'); add_action( 'genesis_footer', 'genesis_footer_widget_areas' );
From that point on, it totally worked. Now I only hope putting the copyright footer following genesis_after doesn't have a downside.
Thanks again guys.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.