Hiding Image Placeholder in Related Events Section

Home Forums Calendar Products Events Calendar PRO Hiding Image Placeholder in Related Events Section

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #101003
    davidemacek
    Participant

    Hi MT!
    Is there a way to hide the image placeholder (calendar icon) in the related events section only if I do not have a featured image for that event. The image takes up a lot of room and looks funny next to other events with an featured image.

    Thanks!

    #101405
    Brook
    Participant

    Howdy davidemacek,

    You can accomplish this with CSS. The following line should work, but since it involves a CSS selector that is not compatible with older IE versions:

    .tribe-related-events-thumbnail img[src="http://yourdomain.com/wp-content/plugins/events-calendar-pro/resources/images/tribe-related-events-placeholder.png"]{
    display:none;
    }

    Or this should work, although it might depend on your theme a bit. Most themes add the ‘.wp-post-image’ image class to custom images, but not to default ones like the calendar. If your theme does this as well, this is very cross browser compatible:

    .tribe-related-events-thumbnail img{
    display:none;
    }
    
    .tribe-related-events-thumbnail .wp-post-image{
    display:inline-block;
    }

    Did that work for you? Please let me know if I can help further! Thanks.

    – Brook

    #101510
    davidemacek
    Participant

    Thanks Brook, the second CSS code worked great! I’m using WooThemes Canvas.

    #101531
    Brook
    Participant

    You are welcome!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Hiding Image Placeholder in Related Events Section’ is closed to new replies.