Title: Custom post type support solution
Last modified: October 26, 2017

---

# Custom post type support solution

 *  [gresakg](https://wordpress.org/support/users/gresakg/)
 * (@gresakg)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-support-solution/)
 * The topic about custom post type support was closed so I have to open a new one.
 * Here is the solution:
 *     ```
       add_filter('pre_get_posts',"my_custom_shared_drafts");
       function my_custom_shared_drafts($query) {
          if(!is_admin()) return; 
          $screen = get_current_screen();
          if($screen->base != "posts_page_shareadraft/shareadraft") return;
          $query->set('post_type',array('post','recipe'));
       }
       ```
   
 * You should add this to your child theme functions.php or your custom plugin. 
   Of course replace “recipe” with your custom post type slug.

The topic ‘Custom post type support solution’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/shareadraft.svg)
 * [Share a Draft](https://wordpress.org/plugins/shareadraft/)
 * [Support Threads](https://wordpress.org/support/plugin/shareadraft/)
 * [Active Topics](https://wordpress.org/support/plugin/shareadraft/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shareadraft/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shareadraft/reviews/)

## Tags

 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)

 * 0 replies
 * 1 participant
 * Last reply from: [gresakg](https://wordpress.org/support/users/gresakg/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-support-solution/)
 * Status: not a support question