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

    nirone
    Participant

    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

    nirone
    Participant

    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

    nirone
    Participant

    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