• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Modifying the Genesis Loop

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Modifying the Genesis Loop

This topic is: resolved

Tagged: genesis loop

  • This topic has 6 replies, 2 voices, and was last updated 10 years ago by Amber.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • May 2, 2015 at 5:25 pm #149869
    Amber
    Member

    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 #149872
    Brad Dalton
    Participant

    You wants 2 loops or 2 sections?


    Tutorials for StudioPress Themes.

    May 2, 2015 at 5:38 pm #149876
    Amber
    Member

    2 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 #149879
    Brad Dalton
    Participant

    You 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/


    Tutorials for StudioPress Themes.

    May 2, 2015 at 6:40 pm #149884
    Amber
    Member

    Thanks 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 #149886
    Amber
    Member

    I'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.

    Genesis Loop Details

    May 2, 2015 at 7:04 pm #149887
    Amber
    Member

    I'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!

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Modifying the Genesis Loop’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble