• Resolved roothost

    (@roothost)


    Hi

    I am using a custom theme, which is set up to use the featured image in posts.

    I created a custom post type, added featured images to these all fine.

    Now, since installing this plugin, I am unable to see the featured image meta box in posts (or any post type) and it is not available as an option in the screen options dropdown.

    Something in this plugin is definately breaking it because deactivating it fixes the issue.

    Any ideas?

    https://www.ads-software.com/plugins/fluid-responsive-slideshow/

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter roothost

    (@roothost)

    I have found the issue.

    The following is placed in fluid-responsive-slideshow/Fluid-Responsive-Slideshow.php

    add_action('after_setup_theme','after_setup_theme_pjc',5);
    
    function after_setup_theme_pjc(){
    	add_theme_support( 'post-thumbnails', array('pjc_slideshow') );
    }

    This is overriding the function already set in the custom theme. Any way around this as, obviously, changing the above will get changed back when I update the plugin??

    Chris

    (@renaissancedesign)

    Here’s a fix:

    add_action('after_setup_theme','after_setup_theme_pjc',5);
    
    function after_setup_theme_pjc(){
            global $_wp_theme_features;
            $_wp_theme_features['post-thumbnails'] = array_merge($_wp_theme_features['post-thumbnails'], array('pjc_slideshow'));
    }
    Thread Starter roothost

    (@roothost)

    Great! Cheers Chris, helpful as always ??

    Plugin Author todiadiyatmo

    (@todiadiatmo)

    cool, thanks cris !

    i’ll put it in the master trunk branch.

    The proper way to use post-thumbnails have always been a problem for me. Many thank for solution ??

    Plugin Author todiadiyatmo

    (@todiadiatmo)

    Hi found :

    https://core.trac.www.ads-software.com/ticket/22080

    It’s ben discused there…

    should be like this for every dev who want to add featured image :

    if(isset($_wp_theme_features[‘post-thumbnails’])){
    global $_wp_theme_features;
    $_wp_theme_features[‘post-thumbnails’] = array_merge($_wp_theme_features[‘post-thumbnails’], array(‘pjc_slideshow’));
    }
    //no other post type using post-thumbnails
    else
    add_theme_support( ‘post-thumbnails’, array(‘pjc_slideshow’) );

    For me it still does not work, i use version 0.9.7 and it still disabled featured images on my posts. Half of my theme widgets are based on featured images from posts and pages. Any other solution?

    Thread Starter roothost

    (@roothost)

    Adding Chris’ function to your functions.php will work. This is what I use and it works fine.

    @todiadiyatmo That is still not going to work (I recently installed your updated plugin on a new site to test).

    Chris

    (@renaissancedesign)

    @todiadiyatmo: You shouldn’t need the if/else condition there, it’s needlessly complicated – just cast $_wp_theme_features[‘post-thumbnails’] to an array instead:

    function after_setup_theme_pjc(){
            global $_wp_theme_features;
            $_wp_theme_features['post-thumbnails'] = array_merge((array)$_wp_theme_features['post-thumbnails'], array('pjc_slideshow'));
    }

    Hey guys,

    The function which was provided by Chris should be added to my theme functions.php or plugin Fluid-Responsive-Slideshow.php ?

    Thread Starter roothost

    (@roothost)

    theme functions.php

    Thanks for help guys. I didn’t add Chris function to my functions.php because it created new errors. However, what worked was simply removing

    if(isset($_wp_theme_features[‘post-thumbnails’])){
    global $_wp_theme_features;
    $_wp_theme_features[‘post-thumbnails’] = array_merge($_wp_theme_features[‘post-thumbnails’], array(‘pjc_slideshow’));
    }
    //no other post type using post-thumbnails
    else
    add_theme_support( ‘post-thumbnails’, array(‘pjc_slideshow’) );

    This part from Fluid-Responsive-Slideshow.php

    Plugin Author todiadiyatmo

    (@todiadiatmo)

    Sventas, what theme do you use ?

    “Glide”, responsive ajax theme. From themeForest

    Plugin Author todiadiyatmo

    (@todiadiatmo)

    Hi all i’ve check with several themes which have featured images

    i ended up with this code :

    global $_wp_theme_features;
    
    	//check if post-thumbnails support defined
    	if(isset($_wp_theme_features['post-thumbnails'])){
    		//check if post-thumbails is set to true ( means all post have featured image), skip if true
    		if(  $_wp_theme_features['post-thumbnails']!=true)
    			//if post thumbnails only defined for specific post, merge the array
    			$_wp_theme_features['post-thumbnails'] = array_merge((array)$_wp_theme_features['post-thumbnails'], array('pjc_slideshow'));
    	}
    Thread Starter roothost

    (@roothost)

    This fix now no longer works, but the featured image box is still missing…..

    Is this ever likely to be fixed or should I dump this plugin>?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Installing this plugin breaks the featured image meta box’ is closed to new replies.