Community Forums › Forums › Archived Forums › Design Tips and Tricks › more full width widget areas in digital pro theme
Tagged: add widgets, digital pro, front page
- This topic has 6 replies, 2 voices, and was last updated 6 years, 10 months ago by Dockter.
-
AuthorPosts
-
May 6, 2017 at 8:54 am #206019DockterParticipant
Hey there,
I am using the Digital Pro Theme with Genesis Framework.
There are 3 Front Page Widget areas I can use. Each one has it own layout configurations (see here the manual):
https://my.studiopress.com/documentation/digital-pro-theme/home-page-setup/front-page-layout-configurations/#front-page-3-layoutMy problem:
- I would like to use a lot more full width areas
- If I put them all in area 1...the problem is, that they all appear in front of the uses picture. But I would like the have the picture alone (with some text and call to action button)
- I can use one full width row in area 2 and another in area 3.
- But I still need more (I use Essential Grid for different Portfolios)...and those ones I would like to have in full width underneath area 1!Is there any chance to have more full width widgets underneath front page 1 widget????
Thanks a lot for your help everyone!
https://dockters.de/May 7, 2017 at 2:04 pm #206066Brad DaltonParticipant1. You can duplicate the existing code in front-page.php :
function additional_front_page_widgets() { genesis_widget_area( 'front-page-4', array( 'before' => '<div id="front-page-4" class="front-page-1"><div class="widget-area fadeup-effect"><div class="wrap">', 'after' => '</div></div></div>', ) ); genesis_widget_area( 'front-page-5', array( 'before' => '<div id="front-page-5" class="front-page-2"><div class="wrap"><div class="flexible-widgets widget-area fadeup-effect' . digital_halves_widget_area_class( 'front-page-5' ) . '">', 'after' => '</div></div></div>', ) ); genesis_widget_area( 'front-page-6', array( 'before' => '<div id="front-page-6" class="front-page-3"><div class="wrap"><div class="flexible-widgets widget-area fadeup-effect' . digital_widget_area_class( 'front-page-6' ) . '">', 'after' => '</div></div></div>', ) ); }
2. Change the i.d's and register more widgets areas in functions.php using the same i.d's as your new widget areas in front-page.php
// Register widget areas. genesis_register_sidebar( array( 'id' => 'front-page-4', 'name' => __( 'Front Page 4', 'digital-pro' ), ) ); genesis_register_sidebar( array( 'id' => 'front-page-5', 'name' => __( 'Front Page 5', 'digital-pro' ), ) ); genesis_register_sidebar( array( 'id' => 'front-page-6', 'name' => __( 'Front Page 6', 'digital-pro' ), ) );
3. The hooks control the positioning of the widget areas.
Example:
add_action( 'genesis_after_header', 'additional_front_page_widgets', 15 );
In this case its genesis_after_header which you can change to any other genesis hook
May 8, 2017 at 12:22 am #206080DockterParticipantHey Brad,
thanks sooooo much so far.
Where do I fill in the hook?:
add_action( 'genesis_after_header', 'additional_front_page_widgets', 15 );AND:
Do I have to change the original 3 widgets for the front page OR can I additionally add them (then I could have 6 or more of them)??Kind regards 🙂
May 8, 2017 at 12:53 am #206082DockterParticipantOk, I just added the hook in the functions.php, which worked fine.
But: The additional widget areas do use the title's pic. Is it possible to leave that area blank or even use a different picture??
thanks very much for your help!!!
May 8, 2017 at 2:05 am #206084DockterParticipantOk. I did finally 🙂
Hopefully I placed the hook correctly. Seems to be.
Thanks really a lot for your help Brad!!!!!!!!!!!!!
you can see the result (so far) here:May 8, 2017 at 1:53 pm #206121Brad DaltonParticipantYou can change the classes in the PHP if you want to style each widget area differently.
May 9, 2017 at 11:11 pm #206220DockterParticipantYes. Did it exact that way. Worked. Thanks a lot again.
I am a total beginner...so thats because I'm asking such "easy" stuff.
Thx -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.