• 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

How To Put Author Box On Pages

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 › How To Put Author Box On Pages

This topic is: not resolved

Tagged: author box, conditional tags, exclude pages, genesis_author_box, genesis_author_box_single

  • This topic has 6 replies, 2 voices, and was last updated 7 years, 2 months ago by Brad Dalton.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • April 4, 2018 at 12:26 pm #218634
    Ian
    Member

    I am looking for a way to add the author box to pages and to be more specific, add them to pages of my choice.

    Anyone got any suggestions please

    April 4, 2018 at 2:29 pm #218648
    Brad Dalton
    Participant

    Use code like this :

    add_action( 'genesis_after_entry', 'genesis_do_author_box_on_page', 8 );
    function genesis_do_author_box_on_page(){
      if ( ! is_singular('page') )
    		return;
    
    	if ( get_the_author_meta( 'genesis_author_box_single', get_the_author_meta( 'ID' ) ) )
    		genesis_author_box( 'single' );
    }
    

    Tutorials for StudioPress Themes.

    April 4, 2018 at 2:32 pm #218649
    Ian
    Member

    That works on every page Brad, is there a way to exclude certain pages ?

    add_action( 'genesis_after_entry', 'genesis_do_author_box_on_page', 8 );
    function genesis_do_author_box_on_page(){
      if ( ! is_singular('page') )
    		return;
    
    	if ( get_the_author_meta( 'genesis_author_box_single', get_the_author_meta( 'ID' ) ) )
    		genesis_author_box( 'single' );
    }
    April 4, 2018 at 2:50 pm #218651
    Brad Dalton
    Participant

    Yes of course. Use conditional tags


    Tutorials for StudioPress Themes.

    April 4, 2018 at 2:53 pm #218652
    Ian
    Member

    I was just reading that page before you replied. On the face of it, it looks a bit heavy going for me. I did find some code but I cannot get it to work for some reason

    April 5, 2018 at 1:43 am #218664
    Brad Dalton
    Participant

    Try adding the conditional tag based on the examples you see on that page and above. You need to replace this part of the above code

    if ( ! is_singular('page') )
    		return;
    

    with you own conditionals.

    You might need to setup a test site if you plan on doing your own custom coding.

    Then you can try different conditionals like:

    Is page with the slug 'contact'

    is_page('contact')
    

    Or

    ! not page with id of 1.

    ! is_page('1')
    

    Tutorials for StudioPress Themes.

    April 6, 2018 at 2:17 am #218681
    Brad Dalton
    Participant

    Try this tutorial


    Tutorials for StudioPress Themes.

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

© 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