Site logo

[Resolved] Editing info in author box

Home Forums Support [Resolved] Editing info in author box

Home Forums Support Editing info in author box

  • This topic has 8 replies, 3 voices, and was last updated 5 years ago by Leo.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1709233
    Christopher

    Hi,

    I’ve used suggestions in previous help threads to show an author box at the end of my posts. It’s pulling both the picture and the bio from Gravatar.

    Basically I want to know how I can edit the bio itself instead of pulling it from Gravatar as I want to add some links to other platforms eg LinkdIn, social media handles etc at the bottom of/under the bio?

    Or alternatively keep the Gravatar bio and add a line of code to include the weblinks?

    I’m using both Hook & Css

    Hook:

    <div class="author-box">
    	<?php 
    	
    	global $post;
    	
    	?>
    	
    	<div class="avatar"><?php echo get_avatar ( get_the_author_meta( 'ID' )); ?></div>
     
            <h5 class="author-title"><?php printf( esc_attr__( 'About %s', 'the author' ), get_the_author_meta( 'display_name') );?></h5>
    	
    				<div class="author-summary">
    	
            <p class="author-description"><?php echo nl2br( get_the_author_meta( 'description' ), null ); ?></p>
     
        </div>
     
    </div>

    CSS:

    .author-box {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
            flex-wrap: wrap;
        padding: 4%;
        margin-top: 60px;
        font-size: 0.8em;
    }
    
    .author-links a {
        font-size: 3em;
        line-height: 0.5em;
        float: right;
    }
    
    .author-box .avatar {
        width: 30px;
        border-radius: 100%;
        margin-right: 20px;
    }
    
    h5.author-title {
        margin-bottom: 0.5em;
    }
    #1709556
    David
    Staff
    Customer Support

    Hi there,

    that code gets the description from the Biography field in the Users page.
    WP doesn’t provide support for things like Social Links by default – so that would need to be coded in.

    The best method to achieve that today is to use a plugin like Simple Author Box:

    https://en-gb.wordpress.org/plugins/simple-author-box/

    It provides the fields for the user links etc and outputs them as part of the author box.

    #1709562
    Christopher

    Thanks

    #1709578
    David
    Staff
    Customer Support

    You’re welcome

    #1709970
    Christopher

    Sorry, follow up question!

    I’ve used your suggestion and installed the simple author box plugin.

    Under the bio/author box it shows a link to another article I’ve written on the site (only written 2 so far).

    Is it possible to get rid of links to other articles by the same author? It doesn’t seem to be a plugin option so I’m wondering if I can do it in generatepress?

    Thanks

    #1709987
    Leo
    Staff
    Customer Support

    GeneratePress doesn’t have any options to modify the content from Simple Author Box.

    I would recommend checking with their support team first 🙂

    #1710008
    Christopher

    Thanks; I thought it might have been auto generated by GP or easily taken out via customizer or css.

    #1710027
    Christopher

    In case anyone looks in the future:

    -Simple Author Box couldn’t help.

    -The fix was Customizer> Layout> Blog>Content > Single > Untick “Display post navigation”

    #1710085
    Leo
    Staff
    Customer Support

    Ahh sorry I misunderstood what you are referring to.

    Glad you’ve figured out 🙂

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.