Community Forums › Forums › Archived Forums › Design Tips and Tricks › Outreach Pro: Additional Widget before Footer Widgets
- This topic has 6 replies, 2 voices, and was last updated 8 years, 9 months ago by
Bren Pace.
-
AuthorPosts
-
February 13, 2017 at 3:05 pm #201076
Bren Pace
ParticipantHi.
I'd like to add a widget to contain an instagram feed code BEFORE the 4-footer images. I thought I could do this using Genesis Simple Hooks but I'm not sure where to put the coding.
Can anyone help?
http://thebuckitblog.com/February 13, 2017 at 3:22 pm #201079Victor Font
ModeratorGenesis Simple Hooks won't get you there because of where you want the widget area to display. The process detailed here can be applied to any Studio Press theme: https://victorfont.com/add-widget-areas-to-news-pro-theme/
The widget area itself needs to registered in functions.php. Because you want the widget to be above the footer widgets, you need to place your display code in the same hook as the footer widgets, but with a lower priority so the new area executes first:
add_action( 'genesis_before_footer', 'my_new_widget_area', 5 );
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?February 13, 2017 at 3:28 pm #201082Bren Pace
ParticipantHi Victor and thank you for your reply.
So add the code:
add_action( 'genesis_before_footer', 'my_new_widget_area', 5 );to the bottom of my function.php and that's it?
February 13, 2017 at 3:37 pm #201085Victor Font
ModeratorNo, that's not it. You have to add a lot of code. Read the article I pointed you to, but here's all the code you need anyway.
genesis_register_sidebar( array( 'id' => 'before-footer-widgets', 'name' => __( 'Before Footer Widgets', 'outreach' ), 'description' => __( 'This is the before footer widget area.', 'outreach' ), ) ); add_action( 'genesis_before_footer', 'my_new_widget_area', 5 ); function my_new_widget_area() { genesis_widget_area( 'before-footer-widgets', array( 'before' => '<div class="before-footer-widgets widget-area">', 'after' => '</div>', ) ); }
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?February 13, 2017 at 3:40 pm #201086Bren Pace
ParticipantOk, thanks so much
February 13, 2017 at 3:43 pm #201087Victor Font
ModeratorI edited the previous reply to add the code you need.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?February 13, 2017 at 3:45 pm #201088Bren Pace
ParticipantVictor,
That is so sweet of you. I know some coding but anytime I get in the editors, I get a little freaked. 🙂 I really appreciate you sharing the entire coding! You're making someone very happy! 😉
Bren
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.