• 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

Some Help Hooking With New Genesis 2 Markup

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 › Design Tips and Tricks › Some Help Hooking With New Genesis 2 Markup

This topic is: resolved

Tagged: genesis 2 hooks, genesis 2 new hooks

  • This topic has 5 replies, 2 voices, and was last updated 11 years, 11 months ago by Marcy.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • July 26, 2013 at 1:02 pm #52635
    Alessandra
    Member

    Hello, Guys!

    I was waiting for an update of the genesis simples hooks plugin, but seems like its gonna take a while...

    I had somethings hooked with that plugin before i updated to genesis 2.0.

    With this update i lost my hooks since many of them changed.

    Now i need to do it through my functions.php i guess, but the thing is that i am having a very hard time with it. I already consulted a lot of tutorials and videos but i get no result at all... =/

    The content i used to have hooked with the genesis simple hooks is this, and it goes into the old genesis_after_post_content Hook:

    <?php if (is_single()) { ?>
    <div class="prev_next">
            Contentet here
        </div>
    
    <div class="share-and-subscribe">
    		Content goes here
    	</div>
    
    <?php } elseif ( is_page() ) { ?>
    <div class="share-and-subscribe">
    		content goes here
    	</div>
    <?php } ?>
    
    

    Would someone please help me out with this?

    Best regards.

    July 26, 2013 at 3:04 pm #52677
    Marcy
    Participant

    You can try using the 'genesis_entry_footer' hook instead of 'genesis_after_post_content'
    You could also try 'genesis_after_entry' but that will be a bit farther below.

    My guess is that the plugin with updates will be released as soon as Genesis 2.0 is.

    So you would use this:

    add_action('genesis_entry_footer', 'custom_entry_footer');
    function custom_entry_footer() {
    [ your content here ]
    }


    Marcy | Amethyst Website Design | Twitter

    July 26, 2013 at 10:55 pm #52730
    Alessandra
    Member

    Thank you so much, Marcy!

    That worked like a charm!

    I just had to change the hook for posts because inside genesis_entry_footer i got the content also showing bellow the excerpts on the home page when i just want this content available bellow the post content inside itself.

    I used:

    add_action( 'genesis_before_comments', 'genesis_before_comments_custom' );
    function genesis_before_comments_custom() { if ( is_single() ) ?>
    
    <div>
    [CONTENT]
    </div>
    
    <?php
    }

    And tried to replicate it to also show this content on pages but with a slightly different content with this:

    add_action( 'genesis_after_endwhile', 'genesis_after_endwhile_custom' );
    function genesis_after_endwhile_custom() { if ( is_page() ) ?>
    
    <div>
    [CONTENT2]
    </div>
    
    <?php
    }
    

    But i got this last piece of content2 also showing on posts.... =/

    Am i doing something stupid?

    July 27, 2013 at 5:45 pm #52879
    Marcy
    Participant

    You're doing great! Conditionals are tricky. 🙂
    I think for CONTENT2, this line should be:

    <?php function genesis_after_endwhile_custom() { if ( ( is_page() ) && (!is_single() )) ?>

    This means if it's a page and not single, so that should keep it from showing on your posts.


    Marcy | Amethyst Website Design | Twitter

    July 27, 2013 at 6:01 pm #52881
    Alessandra
    Member

    Thanks in abundance, Marcy!

    You're my Queen from now on! =}

    You made it work perfectly!

    I S2 You!

    July 28, 2013 at 1:22 pm #52990
    Marcy
    Participant

    Fantastic! You did it!
    You're welcome. 🙂


    Marcy | Amethyst Website Design | Twitter

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and 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