Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Marcus Kober

    (@marcuskober)

    Hi there,

    the compatibility with Gutenberg is given with the latest version of the plugin.

    Have you experienced any problems with Gutenberg or are you expecting a custom Gutenberg block to come with the plugin?

    Regards,
    Marcus

    Thread Starter Andre

    (@andre-jutras)

    Hi Marcus, thanks for the follow up. I just installed your plugin but I still see just the WP default featured image setting in the gutenberg editor; there’s no second option showing.

    Plugin Author Marcus Kober

    (@marcuskober)

    Hi Andre,

    just by installing the plugin you can’t see anything.

    Please add the following to your functions.php to create a second featured image:

    add_filter( 'kdmfi_featured_images', function( $featured_images ) {
      $args = array(
        'id' => 'featured-image-2',
        'desc' => 'Your description here.',
        'label_name' => 'Featured Image 2',
        'label_set' => 'Set featured image 2',
        'label_remove' => 'Remove featured image 2',
        'label_use' => 'Set featured image 2',
        'post_type' => array( 'page' ),
      );
    
      $featured_images[] = $args;
    
      return $featured_images;
    });

    See installation instructions:
    https://ww.wp.xz.cn/plugins/multiple-featured-images/#installation

    Hope that helps!

    Regards,
    Marcus

    Thread Starter Andre

    (@andre-jutras)

    Ah…got it. Now it shows up. I also added ‘post’ to the post_type as well.
    I do have a quick question…how come this function is not in the plugin, instead needing to be added to a theme’s function file?

    Plugin Author Marcus Kober

    (@marcuskober)

    This code isn’t in the plugin because it depends on the user which custom featured images he wants to install. How should it be named? In which post type should it show up?

    In this way the user is completely free to add any featured images he/she wants.

    In a feature version of my plugin there will be an option page to install featured images completely without code…

    Thread Starter Andre

    (@andre-jutras)

    Thanks for the added info….all is good!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Gutenberg compatibility?’ is closed to new replies.