Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to programmatically add a field with values (title,id) from a custom post

  • Avatar of hernangomez
    hernangomez
    Participant

    @hernangomez

    I created a plugin where I registered a ‘custom post’ and i wanted to create a field in the user profile, which allows the user to choose one of this custom post published.
    By the ‘xprofile_insert_field’ function I see I can create the field and assign properties such as type, name, is_required, … but there is no argument for values.
    Anyone can tell me how to do it?
    Since I am developing a plugin, and my idea is to use in a multisite, would be the best place the activation function, or is it recommended somewhere else?

    Thank you very much.

You must be logged in to reply to this topic.