• 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

Can I use a hook for this?

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 › Can I use a hook for this?

This topic is: not resolved
  • This topic has 8 replies, 3 voices, and was last updated 12 years, 1 month ago by mrhiking.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • January 12, 2014 at 8:52 am #84762
    mrhiking
    Member

    I have Facebook and Email share buttons that I want to show up as the first line in my content (entry).

    I would like to automatically add this via a hook, but can't seem to do it.

    Here is a post where I manually added it to the content.
    http://faithfeeder.com/louie-giglio-will-leave-speechless-indescribable/

    Any idea if I can automatically add that via a hook?

    Thanks!
    - Mike

    http://faithfeeder.com/louie-giglio-will-leave-speechless-indescribable/
    January 12, 2014 at 3:03 pm #84817
    Robin
    Member

    Yes, you should be able to use a hook for it. If I'm not sure about a hook, this Genesis Visual Hooks guide is pretty awesome. I'd guess you just want genesis_entry_content, but you may have to add a priority number to your action to make sure it runs before the content itself does. A lower number gets run before a higher number.

    HTH


    I do the best I can with what I’ve got. (say hey on twitter)

    January 12, 2014 at 9:38 pm #84899
    mrhiking
    Member

    Hi Robin -

    Thanks for the reply. How/where do I put the lower number?

    Here's my code I'm using in the Simple Hooks plugin:

    <?php 
        if( is_single() ) { ?>
    <div align="center"><a class="addthis_button_facebook"><img alt="" src="http://faithfeeder.com/wp-content/uploads/2014/01/facebook4.png" /></a> <a class="addthis_button_email"><img src="http://faithfeeder.com/wp-content/uploads/2014/01/email1.png" /></a></div>
    <div style="clear: both;"></div>
    </div>
    <?php
    }
    ?>
    January 12, 2014 at 9:44 pm #84902
    mrhiking
    Member

    I want to add the hook after the post title. I think that's my problem. I don't think I can hook there.
    http://www.screencast.com/t/9h2TGthETTr

    January 13, 2014 at 2:21 am #84927
    Brad Dalton
    Participant

    Try this http://wpsites.net/web-design/how-to-add-content-after-single-post-titles-in-genesis/


    Tutorials for StudioPress Themes.

    January 13, 2014 at 12:17 pm #84996
    mrhiking
    Member

    Brad - You are the man!!! Thanks so much. Works great. Work in progress, but here's a page I implemented it on. http://faithfeeder.com/dads-letter-son-will-make-cry/

    January 13, 2014 at 12:34 pm #85000
    mrhiking
    Member

    Trying to replicate this under the post content, but not working. Here's my code

    genesis_register_sidebar( array(
    	'id'          => 'after-post-content',
    	'name'        => __( 'After Post Content', 'eleven40' ),
    	'description' => __( 'This is the after post content widget area.', 'eleven40' ),
    ) );
    add_action('genesis_after_post_content', 'after_post_content_widget', 11 );
    function after_post_content_widget() {
    	if ( is_singular( 'post' ) )
    		genesis_widget_area( 'after-post-content', array(
    			'before' => '<div class="after-post-content widget-area">',
    			'after'  => '</div>',
    		) );
    
    }
    January 13, 2014 at 3:08 pm #85045
    Robin
    Member

    Since your theme is an HTML5 theme, the genesis_after_post_content hook doesn't exist. You need to either use genesis_entry_content with a large number so it loads after your content, or use genesis_entry_footer with a small number. (source: Visual Hook Guide)

    Great link, Brad--thanks for sharing it!


    I do the best I can with what I’ve got. (say hey on twitter)

    January 13, 2014 at 3:30 pm #85052
    mrhiking
    Member

    Thanks Robin! That worked great.

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

© 2026 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