Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #4237
    Anonymous
    Inactive

    Hello,
    I am developing my first WordPress theme and I am using Gmedia and Advanced custom fileds to create my own type of posts.
    I can’t use gmedia buttons while in my customs posts, neither can attached a gmedia featured image. It is working find in normal post.
    Is there a way to use the two together ?
    Thanks

    #4240
    Rattus
    Keymaster

    You can try to add filter:

    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;
    }
    #4243
    Anonymous
    Inactive

    Thank you for your quick response. It works!
    And thanks for this really good plugin!

    #4244
    Rattus
    Keymaster

    Best thanks will be if you rate plugin with 5 stars: https://wordpress.org/support/view/plugin-reviews/grand-media

    #4245
    Anonymous
    Inactive

    Done!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Gmedia Gallery WordPress Plugin’ is closed to new topics and replies.
Forum closed. Use forum at Wordpress.org: Gmedia Support Forum