Claimed Listing author image

This topic contains 7 replies, has 4 voices, and was last updated by  Kiran 6 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #432201

    Clayton Gibson
    Expired Member
    Post count: 84

    Hi, I want to change the listing author to a default thumbnail.Actually, I already changed the user icon(not claimed yet).I don’t want image of the user in there…Is this possible??I looked at the code on this but I can’t find it..can you help me find it??Thanks

    #432240

    Alex Rollin
    Moderator
    Post count: 27815

    It is possible to hide the author image with CSS:

    
    
    
    .sd-detail-author .author-avatar {display: none !important;}
    

    More styling options are here, search “Author Images and Author Page” on this page:

    https://wpgeodirectory.com/docs/faqs/detail-page/

    #432282

    Clayton Gibson
    Expired Member
    Post count: 84

    No, I don’t want it to hide..I want it to have default image thumbnail even if it is claimed…I don’t want the image to be a user image

    #432284

    Paolo
    Site Admin
    Post count: 31206

    There is no option to do so, but you can probably use CSS to override whatever is there by default…

    Do you want to use the same default image for all users? Claimed and Unclaimed?

    Thanks

    #432359

    Clayton Gibson
    Expired Member
    Post count: 84

    Yes, I want to have the same image thumbnail…

    #432412

    Kiran
    Moderator
    Post count: 7069

    Hi Clayton,

    Use following code snippet to display default thumbnail for author on detail page.

    
    
    function gd_custom_default_author_avatar( $avatar ) {
        global $post;
        
        if ( !empty( $post->ID ) ) {
            $avatar_src = get_stylesheet_directory_uri() . '/images/gravatar2.png';
    		$avatar = '<img src="' . $avatar_src . '" height="100" width="100">';
        }
        
        return $avatar;
    }
    add_filter( 'sd_detail_entry_author', 'gd_custom_default_author_avatar', 100, 1 );

    Kiran

    #432422

    Clayton Gibson
    Expired Member
    Post count: 84

    it works..thank you so much

    #432426

    Kiran
    Moderator
    Post count: 7069

    Great! Glad to hear that 🙂

Viewing 8 posts - 1 through 8 (of 8 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount