Viewing 3 replies - 1 through 3 (of 3 total)
  • Same problem here, the gmedia gallery button does’t work on custom post type (I used advanced custom fields) and I can not also set a gmedia featured image. Everything works fine with the normal posts.
    Thanks for the help.

    Plugin Author Serhii Pasyuk

    (@pasyuk)

    In next version I’ll add options to Gmedia Settings page where you can enable “Gmedia button” for custom post types.

    Ok this worked for me, hope it works for you JordanC26

    add_filter('gmedia-post-types', 'gmedia_custom_posts_support');
    /* By default $post_types = array('post', 'page'); */
    function gmedia_custom_posts_support($post_types){
      $custom_post_types = array('foo', 'bar'); /* Here should be your custom post slugs */
      $post_types = array_merge($post_types, $custom_post_types);
    
      return $post_types;
    }

    Thanks Rattus for it!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Post Type’ is closed to new replies.