• 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

Author name not showing in single post meta

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 › Author name not showing in single post meta

This topic is: resolved

Tagged: Author, post meta, single post

  • This topic has 5 replies, 2 voices, and was last updated 8 years, 8 months ago by Brad Dalton.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • July 3, 2014 at 10:30 am #112881
    bello-via
    Member

    I'm hoping this is an obvious fix that I'm just missing after days of customizations to a current project. For some reason the author name disappears only on single posts and appears just fine on the blog page with all posts showing.

    Link to blog page: Hopeful World - Our Stories

    Link to single post: Hopeful World - Where Hope Begins

    I'm using Genesis Simple Edits with the following in the 'post info' field:
    written by [post_author_posts_link] [post_date]

    I've also got the following added to functions.php to remove the post meta in the footer of each post:

    //* Remove the entry meta in the entry footer (requires HTML5 theme support)
       remove_action( 'genesis_entry_footer', 'genesis_post_meta' );

    Ideally the above PHP was supposed to be conditional and only remove the post meta (categories specifically) on the blog page, not on single posts but I couldn't successfully isolate just the blog page so for now it removes on both single posts and the main blog listing. May eventually post a topic on that for help as well but for now just including the code here in case somehow that's causing my author name to disappear.

    Any help would be MUCH appreciated.

    http://hopefulworld.org/hopefulworld.org
    July 4, 2014 at 1:13 am #112932
    Brad Dalton
    Participant

    You can't use the code and plugin at the same time as they conflict.

    Its more flexible to use the code with a conditional tag so please deactivate the plugin and modify the code to suit your needs.


    Tutorials for StudioPress Themes.

    July 5, 2014 at 1:24 pm #113063
    bello-via
    Member

    That made perfect sense Brad. I was so hopeful that would fix it but no luck. 🙁

    Here's the steps I've tried, testing after each to see if the author name appeared...

    I deactivated the Genesis Simple Edits plugin and even deleted the files for it.
    I deleted the custom PHP code mentioned above (the removal of the entry meta in the footer).
    I added the snippet for "customize the post meta function" code to functions.php (as is, no changes).
    I tried adjusting the snippet code with the wording and arrangement that the client would prefer.
    Lastly, I replaced the functions.php file with the original functions.php from the parallax theme download.

    Still no author name showing on the single post pages. I've also checked to make sure I hadn't added a 'display: none' styling that might affect it in the CSS since I'd tried at one point removing the post footer meta on the excerpts using display:none but was unable to isolate the excerpts only using that method. Never-the-less, I figured I better double check and make sure something wasn't still lingering there.

    I feel like I have a better game plan for getting the wording the way I'd like it but the author name disappearing is going to be an issue with the client I'm sure. Two steps forward, one step back. Could be worse I suppose. Any other ideas?

    July 5, 2014 at 11:49 pm #113113
    Brad Dalton
    Participant

    The snippet needs to be modified correctly and it will work. Used this solution many times.


    Tutorials for StudioPress Themes.

    July 8, 2014 at 10:30 am #113428
    bello-via
    Member

    Kay, 3 days later I figured out what the issue was. Posting the solution here because it drives me nuts when I find posts that describe exactly what I'm trying to do with either no response or no follow-up showing what worked. 🙂

    I found this post where you pointed out that certain get_author_info won't work outside the loop. I realized then that the following code in my functions.php file might be what's causing the same issue as this previous poster.

    // * Relocate titles on Page, Post and other single pages
    add_action( 'genesis_after_header','relocate_entry_title_singular' );
    function relocate_entry_title_singular() {
    
    	if ( ! is_singular() )
    		return;
    	echo '<div class="entry-header-wrapper"><div class="wrap">';
    		genesis_do_post_title();
    		genesis_post_info();
    	echo '</div></div>';
    
    	if ( is_page_template( 'page_blog.php' ) )
    		return;
    	remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
    	remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    	remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
    
    	if ( ! is_singular('post' ) )
    		return;
    	remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
    }

    I changed it to this:

    // * Relocate titles on Page, Post and other single pages
    add_action( 'genesis_after_header','relocate_entry_title_singular' );
    function relocate_entry_title_singular() {
    
    	if ( ! is_singular() )
    		return;
    	echo '<div class="entry-header-wrapper"><div class="wrap">';
    		genesis_do_post_title();
    	echo '</div></div>';
    
    	if ( is_page_template( 'page_blog.php' ) )
    		return;
    	remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
    	remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    	remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
    }

    removing the genesis_post_info(); from the first half of the code and remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); from the last bit there. Problem solved.

    Thanks for the advice on the conflict issue with simple edits and using the custom snippets. That'll definitely be helpful to know for future projects. 🙂

    July 8, 2014 at 1:12 pm #113460
    Brad Dalton
    Participant

    Looks like you worked out the problem and fixed it.


    Tutorials for StudioPress Themes.

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

© 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