• Resolved evans44

    (@evans44)


    I have 2 groups for our directory which includes “current” – current students and then “former” which is the list of former students. The former students do not have photos so we would like to use this simple staff list plugin as it is so easy for the staff member to enter the student information in but we need the former students page to not have the white broken looking image box. I have seen some else statements that could possibly work to place on the sslp-template-functions.php page but I am not a code writer and am not sure how to ensure I am using all of the titles you have created.

    Here is some code I did find searching for some answers:
    // if the url is not empty, display the image
    if(!empty($src)){
    ?>
    ” />
    <?php
    } else {
    // the url was empty, do not display the image
    }

    After seeking more info. I thought I would just go ahead and contact the author of this nice and easy plugin.

    Thank you in advance for any guidance you can give.
    evans44

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Brett Shumaker

    (@brettshumaker)

    Hi @evans44

    Sorry for the delay in my reply, but it looks like you solved this with the following CSS

    
    img[src=""] {
        display: none;
    }
    

    That’s a perfectly fine solution that has been mentioned in this forum before. YOu can also change the Staff Loop Template to use the [staff-photo] tag instead of manually building the <img> element.

    The default of a custom <img> tag in the Staff Loop Template was, in hindsight, not a great idea and will be changing with the next release to simply use the [staff-photo] tag.

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Hide Staff Member Photo Box When There is No Photo Given’ is closed to new replies.