Title: Custom Post Type Error
Last modified: August 20, 2016

---

# Custom Post Type Error

 *  [khuemann](https://wordpress.org/support/users/khuemann/)
 * (@khuemann)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/custom-post-type-error-2/)
 * Hello sometimes when I use this plugin with the custom post type multi selector
   I get this error message as the chooses:
 * ( ! ) Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\
   www\wordpress\wp-content\plugins\buddypress-xprofile-custom-fields-type\bp-xprofile-
   custom-fields-type.php on line 354
    Call Stack #TimeMemoryFunctionLocation 10.0014368256{
   main}( )..\index.php:0 20.0024371960require( ‘C:\wamp\www\wordpress\wp-blog-header.
   php’ )..\index.php:17 32.031948868720require_once( ‘C:\wamp\www\wordpress\wp-
   includes\template-loader.php’ )..\wp-blog-header.php:16 42.031948868784do_action()..\
   template-loader.php:7 52.032248870184call_user_func_array ( )..\plugin.php:406
   62.032248870200bp_template_redirect( )..\plugin.php:406 72.032348870264do_action()..\
   bp-core-actions.php:264 82.035748872952call_user_func_array ( )..\plugin.php:
   406 92.035748872968bp_screens( )..\plugin.php:406 102.035748873024do_action( )..\
   bp-core-actions.php:189 112.036148873968call_user_func_array ( )..\plugin.php:
   406 122.036148873984xprofile_screen_edit_profile( )..\plugin.php:406 132.037548871832bp_core_load_template()..\
   bp-xprofile-screens.php:136 142.040448882216load_template( )..\bp-core-catchuri.
   php:394 152.042148909984require_once( ‘C:\wamp\www\wordpress\wp-content\themes\
   pagelines-iblogpro5\members\single\home.php’ )..\template.php:407 162.447449197880locate_template()..\
   home.php:55 172.448149198040load_template( )..\template.php:383 182.449849214552require_once(‘
   C:\wamp\www\wordpress\wp-content\themes\pagelines-iblogpro5\members\single\profile.
   php’ )..\template.php:407 192.450349214928locate_template( )..\profile.php:31
   202.451149215096load_template( )..\template.php:383 212.453849313424require_once(‘
   C:\wamp\www\wordpress\wp-content\themes\pagelines-iblogpro5\members\single\profile\
   edit.php’ )..\template.php:407 222.508649306928do_action( )..\edit.php:136 232.508749307624call_user_func_array()..\
   plugin.php:406 242.508749307640bxcft_edit_render_new_xprofile_field( )..\plugin.
   php:406 252.544849448544in_array ( )..\bp-xprofile-custom-fields-type.php:354
 * >Anderson Camps
 * Im not sure if this is an error on the plugin’s side or my side. I am running
   it on a localhost server and that may be the issue, and some of the errors are
   from other plugins I’m running, however, all the other plugins are working fine,
   and the first error that appears is from xprofile custom fields plugin.
 * Let me know if there is a way to fix this. Thanks
 * [http://wordpress.org/extend/plugins/buddypress-xprofile-custom-fields-type/](http://wordpress.org/extend/plugins/buddypress-xprofile-custom-fields-type/)

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

 *  Plugin Author [donmik](https://wordpress.org/support/users/atallos/)
 * (@atallos)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/custom-post-type-error-2/#post-3570819)
 * Hi,
 * Maybe it’s because you don’t have any custom post type created. It’s a warning.
   The var which must have custom post type is null. You must create custom post
   type and select one when creating a custom post type multi selector.
 *  Thread Starter [khuemann](https://wordpress.org/support/users/khuemann/)
 * (@khuemann)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/custom-post-type-error-2/#post-3570863)
 * I do have custom post types created. I am using Buisness Directory Plugin, and
   I know that they use custom post types for the directory listings. I shows the
   listing at the bottom of the warning, I just don’t understand why its showing
   the warning in the first place.
 *  Plugin Author [donmik](https://wordpress.org/support/users/atallos/)
 * (@atallos)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/custom-post-type-error-2/#post-3570898)
 * The warning ocurrs when you are going to edit profile. It’s because there is 
   no custom post type selected. Have you selected at least one custom post type
   in admin?
 *  Thread Starter [khuemann](https://wordpress.org/support/users/khuemann/)
 * (@khuemann)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/custom-post-type-error-2/#post-3570911)
 * Yes, I have the custom post type selected in the admin for the xprofile custom
   field.
 *  Thread Starter [khuemann](https://wordpress.org/support/users/khuemann/)
 * (@khuemann)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/custom-post-type-error-2/#post-3570912)
 * If you look at the bottom of the errors, you can see “Anderson Camps” this is
   a custom post type. So it is working, but I am getting all of these errors that
   flood the multiselect box options.
 *  Plugin Author [donmik](https://wordpress.org/support/users/atallos/)
 * (@atallos)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/custom-post-type-error-2/#post-3570972)
 * Sorry for the delay, I was working on a new version. Try it, I’ve been working
   on warnings and notices.

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

The topic ‘Custom Post Type Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/buddypress-xprofile-custom-fields-
   type.svg)
 * [Buddypress Xprofile Custom Fields Type](https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/buddypress-xprofile-custom-fields-type/)
 * [Active Topics](https://wordpress.org/support/plugin/buddypress-xprofile-custom-fields-type/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/buddypress-xprofile-custom-fields-type/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/buddypress-xprofile-custom-fields-type/reviews/)

## Tags

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

 * 6 replies
 * 2 participants
 * Last reply from: [donmik](https://wordpress.org/support/users/atallos/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/custom-post-type-error-2/#post-3570972)
 * Status: not resolved