WordPress.org

Ready to get started?Download WordPress

Forums

Meteor Slides
[resolved] custom posts thumbnail bug (2 posts)

  1. mantish
    Member
    Posted 4 years ago #

    Hi,
    I just found a bug in your plugin.
    I had added post thumbnail support in my theme using this
    add_theme_support('post-thumbnails');
    I also added a custom post types. But then when I installed the plugin, the thumbnails stopped working in my custom post type.

    I found that the cause is in the line 54 of meteor-slides-plugin.php

    elseif ( true === $_wp_theme_features['post-thumbnails'] ) {
    	$_wp_theme_features['post-thumbnails'] = array( array( 'post', 'page', 'slide' ) );
    }

    I fixed it by declaring the post types that are supported:
    add_theme_support('post-thumbnails', array( 'post', 'custom_type' ));

    I hope this is helpful for anyone who may be having similar problems, or for plugin improvement

    http://wordpress.org/extend/plugins/meteor-slides/

  2. Josh Leuze
    Member
    Plugin Author

    Posted 3 years ago #

    Yeah, I don't think there is any way around this. My plugin is setup to check for post thumbnail support and create an array with my post type and other post types that are in use.

    But in order for that to work, your theme or plugin needs to specify any custom post types in an array.

    If it is just coded as add_theme_support('post-thumbnails'));, Meteor Slides assumes that it is supporting post and page types, there;s no way for it to know there's a custom post type that needs support as well.

    Thanks for reporting this, if you have any suggestions for making it more solid, please let me know!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic