Default Header image is appearing on each post

Another issue bugging me on bp-social theme is, on each post I can see the default header image appearing at the top..!! Please let me know how to prevent this from displaying.. If I have any image on my post, it should show. Otherwise, it should be blank.. Kindly help me ASAP..
Thanks in advance.

    DavidM

    Hello psivait,

    I'm not sure of the most efficient way to accomplish that. I'll see if I can get our theme designers/developers to shed some light on the matter.

    Cheers,
    David

    psivait
    • 82
    • #1,393

    What I infer from the bp-social theme is, even though if you don't have any image on a post, a default image (header image) is being populated.. If I have any image on a post, that particular image is fetched correctly and being displayed. The former case is meaningless, and I believe, small codes have to be commented/removed. Please guide me on this part at the earliest.
    Thanks in advance.

    Richie_KS

    hi
    opne bp-social/functions.php go to line 519+
    you should find some code like this

    if(!$get_post_attachment) {
    
    $attach_img =  get_bloginfo('template_directory');
    $sImgString =  $open_class . '< a href="#" >' . '< img src="' . $attach_img . '/_inc/images/header.jpg' . '" class="full" />' . '< /a >' . $close_class;
    echo "$sImgString";
    
    } else {
    
    $sImgString =  $open_class . '< a href="#" >' . '< img src="' . $get_post_attachment . '" alt="ui" class="full" />' . '< /a >' . $close_class;
    echo "$sImgString";
    
    }

    comment out the first code before } else {..to like this

    /*
    $attach_img =  get_bloginfo('template_directory');
    $sImgString =  $open_class . '< a href="#" >' . '< img src="' . $attach_img . '/_inc/images/header.jpg' . '" class="full" />' . '< /a >' . $close_class;
    echo "$sImgString";
    */

    cheers

    psivait
    • 82
    • #1,393

    Thanks a lot, Richie_KS. You're such a smart developer!
    Could you please read other threads under "bp-social" tag? I hope most of the questions can easily be replied by you.

Join 372423 happy members

Get access to our entire collection of epic plugins, astonishing themes & genius support

Become a member