• 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

"remove_action" non-functional in Genesis 2.0

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 › "remove_action" non-functional in Genesis 2.0

This topic is: not resolved

Tagged: 2.0, code, hooks

  • This topic has 10 replies, 6 voices, and was last updated 11 years, 10 months ago by Efrat.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • August 7, 2013 at 6:09 pm #54761
    taylorishere
    Member

    For example:

    remove_action( 'genesis_entry_header', 'genesis_post_info' );

    Does not work.

    August 7, 2013 at 9:08 pm #54803
    Robert Neu
    Member

    Are you sure you've activated HTML5 correctly? Make sure you add

    add_theme_support( 'html5' );

    to your functions.php file. If you're sure HTML5 has been activated correctly, try this:

    //* Remove the entry meta in the entry header (requires HTML5 theme support)
    remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );

    Co-Founder of Audit WP, a WordPress SEO audit service and Flagship, a new WordPress theme company launching soon!

    August 7, 2013 at 9:17 pm #54805
    taylorishere
    Member

    Why do I have to now include (12) at the end? This used to not be the case.

    The 12 fixed it.

    August 7, 2013 at 9:31 pm #54812
    Robert Neu
    Member

    It was part of the updates in the final version of 2.0. I'm pretty sure the changes they made were to ensure that sections that were merged into one hook would still be hooked in the same order that they were in the XHTML version.

    Gary Jones has a book that outlines all the changes in the latest version. If you're interested in learning more, you can check it out here: http://gamajo.com/changes


    Co-Founder of Audit WP, a WordPress SEO audit service and Flagship, a new WordPress theme company launching soon!

    August 8, 2013 at 1:55 am #54832
    Gary Jones
    Member

    Thanks for the shout out Rob!

    The reasoning for the priorities isn't quite right, but I've just posted http://www.studiopress.community/topic/why-you-shouldnt-feat-updating-to-genesis-2-0-from-1-9-but-should-from-2-0rc2/#post-54831 which should explain the reason for the change, and why it was important to get it right now.


    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

    August 8, 2013 at 12:36 pm #55028
    neilc
    Member

    This doesn't work for me using Genesis 2.0 and its accompanying Genesis Sample theme.

    Both page and post titles appear as before?

    August 8, 2013 at 1:03 pm #55032
    Efrat
    Member

    On the same subject, can someone help me understand why this conversion does not work (it is in Streamline theme (functions.php)):

    /** Relocate the post info function */
    Old (which I've removed):
    remove_action( 'genesis_before_post_content', 'genesis_post_info' );
    add_action( 'genesis_before_post', 'genesis_post_info' );

    New (which I've added):
    remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
    add_action( ‘genesis_before_entry’, ‘genesis_post_info’ );

    Please help...
    Thanks

    August 9, 2013 at 2:22 am #55178
    Gary Jones
    Member

    @neilc - without any code or URL to see I can't offer any help. Start a new thread with as much info as possible - the URL, what you've tried, the end result you're aiming for, etc. (Define "doesn't work")


    @Efrat
    - does the existing post info get removed? Does the new one just not get added? (Define "does not work").


    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

    August 9, 2013 at 2:32 am #55179
    Efrat
    Member

    Hi @Gary,

    After the change, the post info got removed (which means that the remove_action works) but it was not added back (which means that the add_action does not work)...

    thanks much

    August 16, 2013 at 2:45 pm #56890
    Joe Thomas
    Member

    @Efrat: What you have...

    remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
    add_action( ‘genesis_before_entry’, ‘genesis_post_info’ );

    worked for me.

    If you can't get it to work, try keeping it within the entry header (but still above the post title) by doing this instead:

    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    add_action( 'genesis_entry_header', 'genesis_do_post_title', 7 );
    remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
    add_action( 'genesis_entry_header', 'genesis_post_info', 6 );

    This

    • 1. Gives the post title a priority of 7
    • 2. changes the priority of the post info to 6

    *Note: With this change, you may have to alter your CSS to target the post info (i.e., .entry-meta), since it will now be inside the entry instead of outside of it as before.


    Owner/Web Developer at LocalBoost.

    August 17, 2013 at 11:54 pm #57125
    Efrat
    Member

    Hi Joe,

    Thank you so much for your help.
    Nick (from StudioPress) helped me with this issue and you won't believe what is the reason for this issue:
    The quotation marks in the add_action (‘) declaration are not the standard quotation characters (')....it should have thrown a php error but it haven't..
    I copied the add_action from a web page (can't remember from where) and these characters were copied from there as well.

    Thanks

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘General Discussion’ 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