Title: Enable Custom Post type
Last modified: August 21, 2016

---

# Enable Custom Post type

 *  Resolved [mnkhalid](https://wordpress.org/support/users/mnkhalid/)
 * (@mnkhalid)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/enable-custom-post-type/)
 * Hi
 * I installed wpbook lite on my website which uses custom post type for events.
   But when i upload events it does not get posted to my facebook. I tried to post
   a blog post and it did get posted. So it seems only custom posts dont. Please
   detail me how to enable custom posts
 * thank you
 * [http://wordpress.org/plugins/wpbook-lite/](http://wordpress.org/plugins/wpbook-lite/)

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

 *  Plugin Author [johneckman](https://wordpress.org/support/users/johneckman/)
 * (@johneckman)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/enable-custom-post-type/#post-4457854)
 * To enable custom post types you’ll need to edit some code.
 * In wpbook-lite/includes/publish_to_facebook.php, find lines 97-99:
 *     ```
       if(get_post_type($my_post->ID) != 'post') { // only do this for posts
       			return;
       		}
       ```
   
 * What that basically says is if the post type of the current post is anything 
   other than ‘post’ exit without posting.
 * You would need something like:
 *     ```
       if(get_post_type(($my_post->ID) != 'post') && (get_post_type($my_post->ID) != 'event')) { // only do this for posts
       			return;
       		}
       ```
   
 * I say “something like” because the post type may not be labeled ‘event’
 * If you just want ALL post types you could just remove that whole if statement.
 *  [Sheldon-64](https://wordpress.org/support/users/sheldon-64/)
 * (@sheldon-64)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/enable-custom-post-type/#post-4457873)
 * Exactly what I am looking for, just changed ‘if(‘ to ‘if((‘.
 * I have no clue about coding, pretty pumped I figured that out!

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

The topic ‘Enable Custom Post type’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wpbook-lite_eeeeee.svg)
 * [WPBook Lite](https://wordpress.org/plugins/wpbook-lite/)
 * [Support Threads](https://wordpress.org/support/plugin/wpbook-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/wpbook-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpbook-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpbook-lite/reviews/)

## Tags

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

 * 2 replies
 * 3 participants
 * Last reply from: [Sheldon-64](https://wordpress.org/support/users/sheldon-64/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/enable-custom-post-type/#post-4457873)
 * Status: resolved