• 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://www.ads-software.com/plugins/bp-profile-search/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Andrea Tarantini

    (@dontdream)

    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:

    https://dontdream.it/bp-profile-search/custom-profile-field-types/

    Thread Starter offroad123

    (@offroad123)

    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

    (@dontdream)

    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.