Title: Custom Post Type Countries Dropdown
Last modified: August 21, 2016

---

# Custom Post Type Countries Dropdown

 *  [offroad123](https://wordpress.org/support/users/offroad123/)
 * (@offroad123)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/custom-post-type-countries-dropdown/)
 * I am using custom post type countries as a profile field in buddy-press because
   Buddypress Xprofile Custom Fields Type Plugin give option to use custom post 
   type as a profile field.
 * Now I want to use country drop-down on search page. i try to add on search page
   but it give me a error message **“Your HTML code for the select_custom_post_type
   field type goes here”**.
 * Please provide me some solution because i have waste to much time on it.
 * [https://wordpress.org/plugins/bp-profile-search/](https://wordpress.org/plugins/bp-profile-search/)

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

 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/custom-post-type-countries-dropdown/#post-5064787)
 * Hi offroad123,
 * Unfortunately _Buddypress Xprofile Custom Fields Type_ is not yet compatible 
   with _BP Profile Search_, but if you have some programming skills you can make
   it compatible for your field type.
 * All the documentation is in my page:
 * [http://dontdream.it/bp-profile-search/custom-profile-field-types/](http://dontdream.it/bp-profile-search/custom-profile-field-types/)
 *  Thread Starter [offroad123](https://wordpress.org/support/users/offroad123/)
 * (@offroad123)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/custom-post-type-countries-dropdown/#post-5064945)
 * Hi Andrea,
 * When i try to use select_custom_post_type(custom post) and display as selectbox,
   selectbox appear with custom post type name(countries) not post option means 
   country list.
    here is my code that i use.
 *     ```
       function bxcft_map ($field_type, $field)
       {
           if ($field_type == 'select_custom_post_type')  return 'selectbox';
           return $field_type;
       }
       ```
   
 * ??
 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/custom-post-type-countries-dropdown/#post-5064950)
 * That’s because you are using the _bps\_field\_html\_type_ hook, and mapping your
   custom type to a selectbox. That doesn’t work because the two types are stored
   differently in the database.
 * You should use the _bps\_field\_html_ hook instead, and return the actual HTML
   code for your countries drop down, taking the country list from wherever in the
   database it is stored.

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

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

 * ![](https://ps.w.org/bp-profile-search/assets/icon.svg?rev=1568973)
 * [BP Profile Search](https://wordpress.org/plugins/bp-profile-search/)
 * [Support Threads](https://wordpress.org/support/plugin/bp-profile-search/)
 * [Active Topics](https://wordpress.org/support/plugin/bp-profile-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bp-profile-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bp-profile-search/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/custom-post-type-countries-dropdown/#post-5064950)
 * Status: not resolved