Title: Exclude Multiple Custom Post Types
Last modified: August 21, 2016

---

# Exclude Multiple Custom Post Types

 *  Resolved [Shilo Rune 96](https://wordpress.org/support/users/shilo-rune-96/)
 * (@shilo-rune-96)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/exclude-multiple-custom-post-types/)
 * Hey thanks for the simple plugin!
 * I found your code:
    `if( !is_page( ) && 'portfolio' != get_post_type() && file_exists(
   $fileName )){`
 * Do you have a minute to paste the code to exclude multiple post types? I need
   to remove two as it stands.
 * [https://wordpress.org/plugins/bottom-of-every-post/](https://wordpress.org/plugins/bottom-of-every-post/)

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

 *  Plugin Author [Corey Salzano](https://wordpress.org/support/users/salzano/)
 * (@salzano)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/exclude-multiple-custom-post-types/#post-5073440)
 * Try this:
 * `if( !is_page( ) && 'first-type' != get_post_type() && 'second-type' != get_post_type()&&
   file_exists( $fileName )){`
 * or this:
 * `if( !is_page( ) && !in_array(get_post_type(), array("first-type", "second-type"))&&
   file_exists( $fileName )){`
 *  Thread Starter [Shilo Rune 96](https://wordpress.org/support/users/shilo-rune-96/)
 * (@shilo-rune-96)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/exclude-multiple-custom-post-types/#post-5073466)
 * Thanks!
 * The first one worked 🙂
 *  [John Frusciante](https://wordpress.org/support/users/gregykos/)
 * (@gregykos)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/exclude-multiple-custom-post-types/#post-5073599)
 * Im also interested on disabling the plugin on different categories or post types.
   Im using the ‘The Events Calendar’ plugin which creates posts for each new event,
   but I would like to exclude that category. Any help ?
 *  Plugin Author [Corey Salzano](https://wordpress.org/support/users/salzano/)
 * (@salzano)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/exclude-multiple-custom-post-types/#post-5073600)
 * There are instructions for excluding specific categories here: [http://www.umbrellastudio.com/wordpress/bottom-of-every-post/](http://www.umbrellastudio.com/wordpress/bottom-of-every-post/)

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

The topic ‘Exclude Multiple Custom Post Types’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bottom-of-every-post.svg)
 * [Bottom of every post](https://wordpress.org/plugins/bottom-of-every-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bottom-of-every-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bottom-of-every-post/)
 * [Active Topics](https://wordpress.org/support/plugin/bottom-of-every-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bottom-of-every-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bottom-of-every-post/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Corey Salzano](https://wordpress.org/support/users/salzano/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/exclude-multiple-custom-post-types/#post-5073600)
 * Status: resolved