• 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 box inside a post

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 › author box inside a post

This topic is: not resolved

Tagged: author box

  • This topic has 8 replies, 4 voices, and was last updated 10 years, 3 months ago by udijw.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • May 18, 2016 at 4:56 am #185820
    udijw
    Member

    I want to create a page showing all the authors on my blog, is there a way (a shortcode maybe) to place an author box inside a post?
    thanks,
    udi

    May 18, 2016 at 5:06 am #185822
    Victor Font
    Moderator

    See this snippet: http://my.studiopress.com/snippets/author-box/#enable-single


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    May 18, 2016 at 5:30 am #185824
    udijw
    Member

    I see how this will enable a box, but not how it would allow me to place a box as part of a post's text

    May 18, 2016 at 6:06 am #185827
    Victor Font
    Moderator

    If you want the author box inside the content itself, you have to create a custom function. That capability is not built into WordPress or Genesis. This should get you started. I have not tested it, so you are on your own.

    function wpb_author_info_box( $content ) {
        global $post;
    
        // Detect if it is a single post with a post author
        if ( is_single() && isset( $post->post_author ) ) {
    
            // Get author's display name 
            $display_name = get_the_author_meta( 'display_name', $post->post_author );
    
            // If display name is not available then use nickname as display name
            if ( empty( $display_name ) )
                $display_name = get_the_author_meta( 'nickname', $post->post_author );
    
            // Get author's biographical information or description
            $user_description = get_the_author_meta( 'user_description', $post->post_author );
    
            // Get author's website URL 
            $user_website = get_the_author_meta('url', $post->post_author);
    
            // Get link to the author archive page
            $user_posts = get_author_posts_url( get_the_author_meta( 'ID' , $post->post_author));
    
            if ( ! empty( $display_name ) )
                $author_details = '<p class="author_name">About ' . $display_name . '</p>';
    
            if ( ! empty( $user_description ) )
                // Author avatar and bio
                $author_details .= '<p class="author_details">' . get_avatar( get_the_author_meta('user_email') , 90 ) . nl2br( $user_description ). '</p>';
    
            $author_details .= '<p class="author_links"><a href="'. $user_posts .'">View all posts by ' . $display_name . '</a>';  
    
            // Check if author has a website in their profile
            if ( ! empty( $user_website ) ) {
                // Display author website link
                $author_details .= ' | <a href="' . $user_website .'" target="_blank" rel="nofollow">Website</a></p>';
            } else { 
                // if there is no author website then just close the paragraph
                $author_details .= '</p>';
            }
    
            // Pass all this info to post content  
            $content = $content . '<footer class="author_bio_section" >' . $author_details . '</footer>';
        }
        return $content;
    }
    
    // Add our function to the post content filter 
    add_action( 'the_content', 'wpb_author_info_box' );
    // Allow HTML in author bio section 
    remove_filter('pre_user_description', 'wp_filter_kses');

    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    May 18, 2016 at 6:30 am #185829
    udijw
    Member

    Thanks Victor, this is way over my head ๐Ÿ™‚

    May 19, 2016 at 10:51 pm #185937
    phamtuanh
    Member

    thanks


    nแบฅm lim xanh very good nam lim xanh ok

    May 20, 2016 at 3:34 am #185950
    Brad Dalton
    Participant

    In spent some time working out this solution for my sites members


    Tutorials for StudioPress Themes.

    May 20, 2016 at 3:52 am #185951
    udijw
    Member

    @braddalton - sweet. is there a non paid version for this solution?

    May 20, 2016 at 4:08 am #185952
    udijw
    Member

    nevermind ๐Ÿ™‚ bought a subscription

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

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