• Resolved marleness

    (@marleness)


    Hi all

    how do I remove Thumbnail images from the single event pages (here = Yogavivo). If I dont upload any Thumbnail/Logo, there will just be an icon that shows that something is missing.

    Thanks,
    Marlene

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    Please use the following shortcode in the functions.php file at your theme side:

    /* Remove event thumbnail from header of signle event page */
    function wordpress_hide_feature_image( $has_thumbnail, $post, $thumbnail_id ) {
      return is_singular( 'event_listing' ) ? false : true;
    }
    // add the filter
    add_filter( 'has_post_thumbnail', 'wordpress_hide_feature_image', 10, 3);

    Regards
    Priya

    Thread Starter marleness

    (@marleness)

    Hi,

    I tried this but what happened was, that the thumbnai/logo in the bottom disappeared and instead there was an icon for missing images. The tumbnail/logo in the top of the pages was still there.

    Any other ideas?

    Best,
    Marlene

    Hi,

    By default WordPress themes are adding thumbnail on a single page using this filter
    post_thumbnail_html
    It looks like your theme is adding the author box from his end. So I would request you to ask your theme author to provide settings to disable the image injection on each single post or provide a filter to disable on specific post type.

    Also try this if works for you

    function wordpress_hide_feature_image( $html, $post_id, $post_image_id ) {
      return is_single() ? '' : $html;
    }
    // add the filter
    add_filter( 'post_thumbnail_html', 'wordpress_hide_feature_image', 10, 3);

    Regards
    Priya

    • This reply was modified 4 years, 6 months ago by Priya Goenka.

    Hi @marleness

    If you don’t want to check too much things and just want to hide using CSS then please add the following css to your child theme
    .single-post-wrap .wp-post-image{display:none}

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove Tumbnails’ is closed to new replies.