Support » Theme: Clean Yeti Basic » How to not display post images?

  • Resolved Daedalon


    We have custom post types (Events Manager‘s events and locations) and use custom code to display them. We’ve been able to override many other defaults in our child theme of Clean Yeti Basic, but haven’t yet found how to not display post images.

    How can the post images be turned off?

Viewing 6 replies - 1 through 6 (of 6 total)
  • From theme author in

    disable post-images:
    add the following line to your childtheme’s functions.php file
    remove_theme_support( ‘post-thumbnails’ );
    Reference Link

    I corrected the quote above to spell post-thumbnails with a dash instead of underscore. However, I wasn’t able to get this to work. Tried that line solo, and during the after_setup_theme and init actions:

    function my_post_thumbnails_remove() {
        remove_theme_support( 'post-thumbnails' );
    add_action( 'after_setup_theme', 'my_post_thumbnails_remove' );

    Edit: This could be a conflict with the theme and Easy FancyBox, which we have been happily using. Will investigate.

    Edit 2: Nope, issue still remains after disabling Easy FancyBox.

    I’ve tracked the issue this far:

    1. Single.php calls cleanyetibasic_singlepost() on line 30.
    2. Library/extensions/content-extensions.php’s line 491, get_template_part( 'library/postformats/format', $format );, runs library/postformats/format-standard.php.
    3. Library/postformats/format-standard.php< calls cleanyetibasic_insert_featured_image() on line 22.
    4. That function, on library/extensions/attachment-extensions.php, doesn’t check whether theme supports thumbnails or not. Based on the documentation of Post Thumbnails, adding or removing support for them only affects the admin UI: “interface for assigning these images will appear on the Edit Post and Edit Page screens”. Removing theme support will only remove the admin UI. This is as it should be, as this allows for use cases where the thumbnails are used but cannot be modified via the default Edit Post UI.

    As a result, the theme should provide its own setting for showing or not showing post thumbnails. An admin panel setting would be perfect, as this is an on/off setting. It can also be used for the copyright I suggested as for example Elbee Elgee does.

    Theme Author Serene Themes


    I believe I’ll remove the function from format-standard.php and leave it in format-image.php. That way the standard post format will not display an image, but can be accomplished through the image post format.

    Do I understand correctly that for our part the default image for our custom post type would disappear by updating Clean Yeti Basic? Do you already know in which version?

    Theme Author Serene Themes


    Yes, and it is included in 2.0.3. format-standard.php is the default template that is called. I’ve removed the function cleanyetibasic_insert_featured_image() from that file. Let me know if there any issues.

    Confirmed, works. WordPress offered the update to 2.0.3, and updating removed the post images. As per Richard’s statement above they should also be more easily customizable now. Marking as resolved. Thanks, Richard!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to not display post images?’ is closed to new replies.