[Support request] the is the exact function to get rounded post author output with image

Home Forums Support [Support request] the is the exact function to get rounded post author output with image

Home Forums Support the is the exact function to get rounded post author output with image

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #544949
    subham sarkar

    Hi,

    I am complete newbies really don’t have any idea about coding and all to get something like this

    http://prntscr.com/j2r0fw

    I tried this filter but it shows the square image which is large enough to overlap the name

    add_filter( 'generate_post_author_output', 'tu_add_author_gravatar' );
    function tu_add_author_gravatar() {
    	printf( ' <span class="byline">%1$s</span>',
    		sprintf( '<span class="author vcard" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="author">%1$s %5$s<a href="%2$s" title="%3$s" rel="author"><span class="author-name" itemprop="name">%4$s</span></a></span>',
    			__( 'by','generatepress'),
    			esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    			esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ), get_the_author() ) ),
    			esc_html( get_the_author() ),
    			get_avatar( get_the_author_meta( 'ID' ) )
    		)
    	);
    }
    GP Premium 1.6.2
    #545373
    Leo
    Staff
    Customer Support

    Hi there,

    You would need a bit of CSS to make the image round.

    Can you link me to the site in question?

    You can edit the original topic and use the private URL field.

    Let me know ๐Ÿ™‚

    #545493
    subham sarkar

    yes did this please have a look

    #545618
    Leo
    Staff
    Customer Support

    Hmm I’m not seeing the author picture showing up anywhere?

    Can you guide me to a post where it’s showing?

    #545620
    subham sarkar

    no, I remove the function because it was not in place so I like to get something like this http://prntscr.com/j2r0fw

    can you please guide me

    #545743
    Leo
    Staff
    Customer Support

    Hard to assist without seeing it live unfortunately.

    Is this the thread you are following? https://generatepress.com/forums/topic/i-have-3-question/#post-418742

    If so did you try his CSS as well?

    #545754
    subham sarkar

    anyway leave it I don’t think I can do this

    #545947
    Tom
    Lead Developer
    Lead Developer

    Along with the function you were using, try adding this CSS:

    .byline img {
        height: 25px;
        width: auto;
        border-radius: 50%;
        display: inline-block;
        margin: 0 5px;
        position:  relative;
        bottom: -5px;
    }

    It should make it look nicer ๐Ÿ™‚

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