August 7, 2013 at 6:09 pm #54761taylorishereMember
remove_action( 'genesis_entry_header', 'genesis_post_info' );
Does not work.August 7, 2013 at 9:08 pm #54803Robert NeuMember
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 );
August 7, 2013 at 9:17 pm #54805taylorishereMember
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 #54812Robert NeuMember
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
August 8, 2013 at 1:55 am #54832Gary JonesMember
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.
August 8, 2013 at 12:36 pm #55028neilcMember
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
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’ );
ThanksAugust 9, 2013 at 2:22 am #55178Gary JonesMember
@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").
August 9, 2013 at 2:32 am #55179
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 muchAugust 16, 2013 at 2:45 pm #56890Joe ThomasMember
@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 );
- 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
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.
- The forum ‘General Discussion’ is closed to new topics and replies.