• 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

Upgraded to Genesis 2.0.0 but Post Info text now displays incorrectly

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 › Upgraded to Genesis 2.0.0 but Post Info text now displays incorrectly

This topic is: not resolved
  • This topic has 19 replies, 7 voices, and was last updated 9 years, 7 months ago by Poursuivant.
Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • August 7, 2013 at 2:45 pm #54700
    neville
    Member

    Just got hold of Genesis 2.0.0! Running on my test WordPress site, kick the tyres, get to know it and what's new, planning to upgrade my primary blog at the weekend.

    Test site: http://www.nevillehobson.com/sandbox2/

    The upgrade went fine as expected. But one thing now doesn't work as it did before.

    It's an odd thing. The test site with Genesis runs the eleven40 child theme, version 1.1 - I've not yet upgraded the child theme to the new eleven40 Pro 2.0. All I did was upgrade Genesis itself.

    In each post, I have the post info details: date of post and author. Instead of displaying that info correctly as it did before, it now displays the actual code, as in:

    published may 24, 2013 by neville hobson leave a comment

    Edit: can't get this to show as code in this forum post. So here's a screenshot of what it looks like on the blog -

    Screenshot

    The Post info text in Simple Edits is this:

    Published [post_date] by [post_author_link] [post_comments] [post_edit]

    It's been that since I first installed Genesis and eleven40 - nothing has changed except today's Genesis upgrade.

    Have the short codes changed? I can't see anything on the support website. Or will this work correctly if I update the theme to eleven40 Pro?

    Thanks for your help!


    Twitter: @jangles

    http://www.nevillehobson.com/sandbox2/
    August 7, 2013 at 7:11 pm #54775
    Marcy
    Participant

    Yes, the genesis_post_info hook has changed just a bit. Since you're running eleven40 though, I would just update to 2.0 whenever you can. That should fix it.


    Marcy | Amethyst Website Design | Twitter

    August 7, 2013 at 7:28 pm #54783
    KenTheriot
    Member

    That didn't happen to me. I have Eleven40 as well and have not started using Eleven40-Pro (tried but didn't like). Have others had the same post-info issue?

    Ken

    August 7, 2013 at 10:16 pm #54819
    Bill Murray
    Member

    @Marcy - I don't think that's exactly accurate. genesis_post_info is a filter, not a hook. See the first code sample. Further, Genesis 2.0 is 100% backwards compatible (excluding bugs and unintended consequences) with themes released before Genesis 2.0 was released - provided that HTML5 is not enabled. Since the OP said all he did was upgrade Genesis but not his child theme, there's likely something else going on.


    @neville
    - I'll take a guess and say you are using Google authorship? Have you checked your Genesis settings to make sure your user profile is still selected in Genesis SEO settingss? Is your Google+ profile entered? After a quick look at the code, I think the cause is nothing you did but rather is due to adding esc_html() on line 170 of genesis/lib/shortcodes/post.php. I'll ask around and let you know what I find out.


    Web: https://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    August 7, 2013 at 10:32 pm #54821
    Bill Murray
    Member

    That esc_html() is on line 171, not 170. I need new glasses desperately.


    Web: https://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    August 8, 2013 at 1:12 am #54828
    Gary Jones
    Member

    genesis_post_info is a filter, not a hook

    Filters are hooks, as are actions.

    That esc_html() does look incorrect. It's also not something that was in 1.9, so I agree that in this case, we've changed the default behaviour.

    I'll get Nathan to take a look, but since I'm 99% certain that we'll remove that esc_html() in core, you've got two options.

    1) Remove the esc_html( and ) (leave the $author bit) in your copy of Genesis as well - usually that's a big no-no, but in this case, the next version of Genesis will have the same fix applied anyway.

    2) Try adding the code from https://gist.github.com/GaryJones/6182252 to your child theme functions.php as a temporary workaround.


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

    August 8, 2013 at 3:18 am #54838
    neville
    Member

    Thanks, everyone, I appreciate your time and suggestions.


    @Marcy
    - I do intend to upgrade eleven40 to eleven40 Pro. But, I hesitate because I want to keep the orange header title background in eleven40 that looks as though is no longer there in eleven40 Pro, according to the demo site. Any idea of how I keep it, ie, what code I need to edit/add?


    @Bill
    Murray - thanks, yes, I do use Google authorship. One thing I checked after upgrading Genesis to 2.0.0 was the link in the SEO settings. It had become unset, so to speak, in the upgrade so I enabled it again and saved the settings.

    @GaryJ - thanks. I tried the second option first (it's within my current skill set :). I copied and pasted the code (from line 5 onwards) into eleven40's functions.php file. It threw this error:

    Warning: Missing argument 2 for gmj_fix_post_info_linked_author() in /[snip]/sandbox2/wp-content/themes/eleven40/functions.php on line 89

    Line 89 in the functions.php file corresponded to this:

    function gmj_fix_post_info_linked_author( $output, $atts ) {

    (I've removed the code now.)

    I'll give your first rec a shot, will advise what happens...

    Thanks everyone, much appreciated.


    Twitter: @jangles

    August 8, 2013 at 5:07 am #54846
    neville
    Member

    FYI, I've installed eleven40 Pro - and the Post Info error that happens with eleven40 is gone.

    That's all I've done - no tweaks, edits, nothing: Genesis 2.0.0. installed out of the box, ditto eleven40 Pro.


    Twitter: @jangles

    August 8, 2013 at 7:37 am #54869
    Gary Jones
    Member

    FWIW, I've updated my code snippet, to fix the error you specified, so should you ever give the non-Pro theme another go (or use linked authors), you've got a workaround.


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

    August 8, 2013 at 8:01 am #54884
    neville
    Member

    @GaryJ - thanks Gary, good to know that.


    Twitter: @jangles

    August 8, 2013 at 8:02 am #54886
    Bill Murray
    Member

    @neville - That works differently, and essentially confirms the issue that I raised with @Garyj. The old eleven40 is not HTML5 whereas the new one does support HTML5.

    The code for the shortcode you are using distinguishes between situations where HTML5 is active (your new, current situation) and when it isn't (your old situation). That's why the end result is different because you upgraded the theme. The code contains a critical logic difference. For HTML5, the esc_html() function is applied to the $author variable separately, as it is being assembled into a string to be displayed. For your old situation, the esc_html() function was effectively applied after the string was assembled as complete HTML, and that's why it broke. As @Garyj indicated, this fix will be in the next update to Genesis, so users of the original Eleven 40 theme that don't plan to upgrade should note this fix. It's good the theme upgrade went smoothly for you, but if you had a lot of theme customizations, more would have been involved.

    @Garyj - Thanks for following up. On the "filters are hooks" issue, you're right. Having read a post elsewhere on the forum on remove_action not working, I had "actions" on my brain rather than what @Marcy actually said about "hooks."


    @Marcy
    - Sorry for my mixup on filters vs actions. I took your comment as "this hook is different in Genesis 2.0", when in fact the hook name and how it is called it is not different but is different in what it does, and that's probably what you were summarizing by "changed just a bit." I tend to be wordy, so sometimes I miss the simple explanations 🙂


    Web: https://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    August 8, 2013 at 8:10 am #54889
    neville
    Member

    @Bill Murray - many thanks for that explanation, Bill, very helpful, appreciate it.


    Twitter: @jangles

    August 8, 2013 at 10:28 am #54968
    Poursuivant
    Member

    Hi,

    I'm having the exact same problem as @neville, except I'm using the Prose theme for my site http://www.reneetaylorcpa.com. Upon updating to Genesis 2.0, my post info looks just like Neville's screenshot above -- except for my info versus his, of course. (I don't know how to make a screenshot.)

    I've verified G+ in my User Profile, and selected myself as the Homepage Author in the Genesis SEO settings. I'm afraid I don't know how to find out if esc_html() is occurring in my code.

    My question: Should I just copy and paste the code from https://gist.github.com/GaryJones/6182252 into the Prose theme's Custom Functions?

    Many thanks for your help!

    August 8, 2013 at 10:51 am #54989
    Gary Jones
    Member

    Yes - from line 5 onwards of my code snippet.


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

    August 8, 2013 at 11:43 am #55012
    Poursuivant
    Member

    Still seems not to work, so I've just removed the Post Info for now. I'll try again later.

    Any idea when a non-temporary fix might be applied?

    Thanks again!

    August 8, 2013 at 2:26 pm #55072
    Gary Jones
    Member

    Well, you could just follow my point 1) above - it's removing less than a dozen characters.


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

    August 8, 2013 at 4:51 pm #55120
    Mealtog
    Member

    ooops, wrong thread.

    August 9, 2013 at 11:37 am #55276
    neville
    Member

    @Poursuivant - Renee, I noticed today an alert on my blog that a new version 2,0 of Genesis Simple Hooks is out. The major change says this:

    Updated to use new entry hooks in Genesis 2.0.

    Maybe installing that might help?

    http://www.studiopress.com/plugins/simple-hooks


    Twitter: @jangles

    August 9, 2013 at 2:34 pm #55319
    Poursuivant
    Member

    Thanks so much Neville! That worked great.

    (I was using the Genesis Simple Edits plugin and didn't know about the Simple Hooks. I appreciate the tip.)

    August 9, 2013 at 2:53 pm #55322
    Poursuivant
    Member

    Oh rats. Now the author info shows up on pages too, which I don't want. http://www.reneetaylorcpa.com/hire-me/

    If anyone knows the code that I should add to Simple Hooks genesis_before_post_content so that author info is displayed on posts only, I'd appreciate it.

    Meanwhile I'll keep looking.....

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

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