• 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

>>PLEASE!: Genesis 2 New Hooks – How to Use?!

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 › >>PLEASE!: Genesis 2 New Hooks – How to Use?!

This topic is: not resolved

Tagged: genesis 2 new hooks

  • This topic has 4 replies, 2 voices, and was last updated 12 years, 6 months ago by Alessandra.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • May 30, 2013 at 12:53 pm #43253
    Alessandra
    Member

    Hey, Guys!

     

    I need some help here. I was using the simple hooks plugin with the previous version of the framework, but now i upgraded to the beta version to get that html5 support and already changed my theme to be compatible.

    The thing is that the simple hooks plugin does not work anymore since the hook names are changed. And i had some stuff hooked on my theme using that plugin.

     

    Would someone give me some clue on how to hook those things through my functions.php using the new hooks?

     

    The hooks and the content are these:

    • genesis_before_post_content Hook

    > --->Content inside this hook is:

    <?php
    if(is_page()) { ?>
    <div class="post-info author vcard">Por: <a href="http://denrrou.com.br/author/denrrou/" class="fn n" title="denrrou" rel="author">denrrou</a> Última Atualização em:
    <?php // if the post has been modified, display the modified date
    $published = get_the_date( 'F j, Y' );
    $modified = the_modified_date( 'F j, Y', '', '', FALSE );
    $published_compare = get_the_date( 'Y-m-d' );
    $modified_compare = the_modified_date( 'Y-m-d', '', '', FALSE );
    if ( $published_compare < $modified_compare ) {
    echo '<span class="updated"> ' . $modified . '</span>';
    } ?>
    </div>
    <?php }
    ?>
    > And...

    • genesis_after_post_content Hook

    > -->Hook content:

    <?php if (is_single()) { ?>
    <div class="prev_next">
    <div class="nav_left">
    <span class="prev">Post Anterior:</span> <?php previous_post_link('%link', '%title'); ?>
    </div class="nav_right">
    <div>
    <span class="next">Próximo Post:</span> <?php next_post_link('%link', '%title'); ?>
    </div>
    </div>

    <div class="share-and-subscribe">
    <div class="left">
    <h4 id="compartilhe">Compartilhe!</h4>
    <p><iframe src="//www.facebook.com/plugins/like.php?href=<?php the_permalink(); ?>&amp;send=false&amp;layout=button_count&amp;width=100&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=122606047898277" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe></p>
    <p><a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-text="<?php the_title(); ?>" data-via="denrrou">Tweet</a></p>
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
    <p>
    <div class="g-plusone" data-size="medium"></div>
    <script type="text/javascript">
    (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
    })();
    </script>
    </p>
    <p><script src="//platform.linkedin.com/in.js" type="text/javascript"></script>
    <script type="IN/Share" data-url="<?php the_permalink(); ?>" data-counter="right"></script></p>
    </div>
    <div class="right">
    <h4 id="newsletter">Subscreva e Nunca Perca um Post!</h4>
    <p>Subscreva gratuitamente a nossa Newsletter para dicas e atualizações!</p>
    <form method="post" action="http://newsletter.denrrou.com/form.php?form=1" id="frmSS1" onsubmit="return CheckForm1(this);">
    <p><label for="newsletter-name">Nome:</label> <input type="text" class="newsletter subscriber name" name="CustomFields[2]" id="CustomFields_2_1" value=""></p>
    <p><label for="newsletter-email">Email:</label> <input type="text" class="newsletter subscriber email" name="email" value="" /></p>
    <input type="hidden" name="format" value="h" />
    <p class="subscribe-button"><button type="submit" class="subscribe">Subscrever Agora!</button></p>
    </form>
    <script type="text/javascript">
    // <![CDATA[

    function CheckMultiple1(frm, name) {
    for (var i=0; i < frm.length; i++)
    {
    fldObj = frm.elements[i];
    fldId = fldObj.id;
    if (fldId) {
    var fieldnamecheck=fldObj.id.indexOf(name);
    if (fieldnamecheck != -1) {
    if (fldObj.checked) {
    return true;
    }
    }
    }
    }
    return false;
    }
    function CheckForm1(f) {
    var email_re = /[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i;
    if (!email_re.test(f.email.value)) {
    alert("• Mas... Primeiro me deixe saber o seu email! Insira-o no campo abaixo e eu funcionarei! ☺");
    f.email.focus();
    return false;
    }

    return true;
    }

    // ]]>
    </script>

    </div>
    </div>
    <?php } elseif ( is_page() ) { ?>
    <div class="share-and-subscribe">
    <div class="left">
    <h4 id="compartilhe">Compartilhe!</h4>
    <p><iframe src="//www.facebook.com/plugins/like.php?href=<?php the_permalink(); ?>&amp;send=false&amp;layout=button_count&amp;width=100&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=122606047898277" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe></p>
    <p><a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-text="<?php the_title(); ?>" data-via="denrrou">Tweet</a></p>
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
    <p>
    <div class="g-plusone" data-size="medium"></div>
    <script type="text/javascript">
    (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
    })();
    </script>
    </p>
    <p><script src="//platform.linkedin.com/in.js" type="text/javascript"></script>
    <script type="IN/Share" data-url="<?php the_permalink(); ?>" data-counter="right"></script></p>
    </div>
    <div class="right">
    <h4 id="Newsletter">Subscreva e Nunca Perca um Post!</h4>
    <p>Subscreva gratuitamente a nossa Newsletter para dicas e atualizações!</p>
    <form method="post" action="http://newsletter.denrrou.com/form.php?form=1" id="frmSS1" onsubmit="return CheckForm1(this);">
    <p><label for="newsletter-name">Nome:</label> <input type="text" class="newsletter subscriber name" name="CustomFields[2]" id="CustomFields_2_1" value=""></p>
    <p><label for="newsletter-email">Email:</label> <input type="text" class="newsletter subscriber email" name="email" value="" /></p>
    <input type="hidden" name="format" value="h" />
    <p class="subscribe-button"><button type="submit" class="subscribe">Subscrever Agora!</button></p>
    </form>
    <script type="text/javascript">
    // <![CDATA[

    function CheckMultiple1(frm, name) {
    for (var i=0; i < frm.length; i++)
    {
    fldObj = frm.elements[i];
    fldId = fldObj.id;
    if (fldId) {
    var fieldnamecheck=fldObj.id.indexOf(name);
    if (fieldnamecheck != -1) {
    if (fldObj.checked) {
    return true;
    }
    }
    }
    }
    return false;
    }
    function CheckForm1(f) {
    var email_re = /[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i;
    if (!email_re.test(f.email.value)) {
    alert("• Ué... Você está se parecendo comigo! Não esqueça de inserir primeiro o seu email! ☺");
    f.email.focus();
    return false;
    }

    return true;
    }

    // ]]>
    </script>

    </div>
    </div>
    <?php } ?>

    Will be very grateful if you can help me out on this.

    Best regards.

    http://denrrou.com.br
    May 30, 2013 at 6:39 pm #43279
    Brad Dalton
    Participant

    I don't think the Genesis Simple Hooks plugin uses the new hooks just yet.

    You may need to use the code in custom functions using the new hooks in your child themes functions.php file.


    Tutorials for StudioPress Themes.

    May 30, 2013 at 6:53 pm #43281
    Alessandra
    Member

    Hello, Brad!

     

    I know that. The plugin should be updated only after the final release of the Framework.

     

    Do you know how i can implement that through the new hooks based on the information i gave on my initial question?

    =/

     

    Thanks!

    May 30, 2013 at 6:58 pm #43282
    Brad Dalton
    Participant

    You would need to use the new hooks in custom functions with your existing code rather than use Simple Hooks.

    Once you've added HTML 5 support to your child theme, some of the old hooks won't work as they have been renamed.

    Try this http://www.nathanrice.net/blog/genesis-loop-hooks/

    I'd guess that SP will release a table comparison of the new and old hooks shortly.

    Try these:

    genesis_before_post_content  = genesis_before_entry_content
    
    genesis_after_post_content  = genesis_after_entry_content
    

    Tutorials for StudioPress Themes.

    June 2, 2013 at 12:27 pm #43638
    Alessandra
    Member

    could not get great results with those.... =/

     

    i miss that plugin so much... sniff... sniff

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 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