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
    • 1,378 pts
      6,427 pts
      LEVEL 24

    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
    • 53 pts
      82 pts
      LEVEL 3

    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
    • 155 pts
      1,631 pts
      LEVEL 10

    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
    • 53 pts
      82 pts
      LEVEL 3

    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 388069 HAPPY MEMBERS

We pride ourselves on our level of customer support and responsiveness to member requests. Your WordPress experience will never be the same


Become a member

  • PayPal Partner