• 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

Hide author box after single post if user bio is empty

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 › Hide author box after single post if user bio is empty

This topic is: not resolved

Tagged: author box, genesis_do_author_box_single, get_the_author_meta

  • This topic has 3 replies, 2 voices, and was last updated 4 years, 10 months ago by Brad Dalton.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • June 27, 2017 at 7:32 pm #208357
    mmjaeger
    Member

    Hello
    Could anybody please tell me how to hide the author box if the author (user) bio is empty.

    thank you in advance for your help.

    June 28, 2017 at 3:54 am #208363
    Brad Dalton
    Participant

    Just wrote and tested this code https://wpsites.net/web-design/remove-author-box-in-genesis-if-bio-description-empty/


    2700 Genesis Tutorials

    June 28, 2017 at 6:22 am #208369
    mmjaeger
    Member

    Thanks for your input
    I came up with the following code and it seems to work as well:

    add_filter( 'get_the_author_genesis_author_box_single', 'thx_get_the_author_genesis_author_box_single', 10, 2 );
    function thx_get_the_author_genesis_author_box_single( $value, $user_id ) {
    	
    	$field = get_the_author_meta( 'description', $user_id );
    	
    	if ($field)
    		return true;
    }
    June 28, 2017 at 7:42 am #208372
    Brad Dalton
    Participant

    Good stuff!


    2700 Genesis Tutorials

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

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