Community Forums › Forums › Archived Forums › General Discussion › Modifying the Genesis Loop
Tagged: genesis loop
- This topic has 6 replies, 2 voices, and was last updated 9 years, 5 months ago by Amber.
-
AuthorPosts
-
May 2, 2015 at 5:25 pm #149869AmberMember
I don't have a URL as it's not something that you can really look for. I'm just creating a custom template and adding another tiny mce editor, so that my page can have 2 sections styled differently.
I was hoping you could just fill in the blank as I have my custom template almost ready to go.
<?php /* * This file adds the main template page. * */ /* Template Name: Main Template MultiEdit: Bottom */ //* Minimum custom body class function minimum_add_body_class( $classes ) { $classes[] = 'minimum'; return $classes; } // Homepage CUSTOM LOOP remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_loop', 'my_custom_loop' ); function my_custom_loop () { ?> <div id="main_container"> <div id="single-post" class="entry-content"> add_action( 'genesis_loop', 'genesis_do_loop' ); <!-- #container --> <div id="subfooter"><?php multieditDisplay('Bottom'); ?></div> </div> <!-- end single post --> </div> <!-- end main container --> <?php } genesis(); ?>
The <div id="subfooter"><?php multieditDisplay('Bottom'); ?></div> is where my added tiny mce editor is and will be positioned under the regular genesis loop.
With this setup I only have the content in my 'Bottom' editor showing on the page and not the regular content typically located in the actual genesis loop and I'm not sure why? Is there something I have to do just before the add_action( 'genesis_loop', 'genesis_do_loop' ); line so that my genesis loop will show and then under my 'Bottom' content will show?
I understand I'm actually removing the genesis loop however then what would be the correct way to have both the genesis loop and this new subfooter div display one on top of each other?
May 2, 2015 at 5:32 pm #149872Brad DaltonParticipantMay 2, 2015 at 5:38 pm #149876AmberMember2 sections. In one section there will be the standard genesis loop and below it will be the subfooter div (which will be located outside the main .content.
May 2, 2015 at 6:16 pm #149879Brad DaltonParticipantYou can add a new section using the genesis_before_footer hook.
Example http://wpsites.net/web-design/add-outreach-pro-sub-footer-widgets-to-agency-pro-theme/
May 2, 2015 at 6:40 pm #149884AmberMemberThanks for the suggestion! However maybe the name of the div is misleading (it was something I had copied and pasted in form another tutorial). I need this second section to be still part of the main part of the page and I don't want to widgetize it. I just want to append this new div to the genesis loop.
May 2, 2015 at 6:49 pm #149886AmberMemberI've set up a visual representation. It should be too much coding or though to do this. I just want to add another containing element under the genesis loop.
May 2, 2015 at 7:04 pm #149887AmberMemberI've actually figured it out! Took a while but I believe I have it.
<?php /* * This file adds the main template page. * */ /* Template Name: Main Template MultiEdit: Bottom */ // Homepage CUSTOM LOOP remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_loop', 'my_custom_loop' ); function my_custom_loop () { ?> <div id="primary-content"><?php genesis_do_loop() ?></div> <div id="secondary-content"><?php multieditDisplay('Bottom'); ?></div> <?php } genesis(); ?>
Thank you for your time!
-
AuthorPosts
- The topic ‘Modifying the Genesis Loop’ is closed to new replies.