BuddyDev

Search

[Resolved] BuddyPress Xprofile CFT – Custom post type selector from a custom table

  • Participant
    Level: Initiated
    Posts: 3
    Mozart Moraes on #20506

    Hi all

    I have installed BuddyPress Xprofile Custom Field Types and it is working perfectly.

    However I would like to know if it is possible to use the custom post type selector directed to another table.

    I created a table with the Pods plugin and I need to direct the selector field for this table.

    Thanks for any help.

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #20508

    Hi Mozart,
    Welcome to BuddyDev.

    I am sorry but this plugin won’t allow you to change the data source. The best option I see is creating a new custom field type specific for post.

    For inspiration, You may look at this plugin’s implementation.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 3
    Mozart Moraes on #20512

    Thank you Brajesh for the reply.

    In fact, I’ve created a new custom field called
    “occupation” in the user profile fields. I selected for this field the type “Custom Post Type Selector” and could point to a custom post also called “occupation”.
    However, this list of occupations will always be updated and for this reason I created a new table for it, instead of creating a type of post, that would be in the table wp_posts, making it difficult for me to update the list of occupations.
    This is why I would like to call this new table in this field.

    But thank you again. I’ll think of another alternative.

  • Participant
    Level: Initiated
    Posts: 3
    Mozart Moraes on #20513

    Brajesh,

    I tried the alternative now, creating a custom post type called “setor”, to be able to call through the “Custom Post Type Selector”, thus choosing the post type “setor”.

    The problem I found now is that this type does not fix. Even saving multiple times, it keeps calling the type “post” and not the custom type “setor”.
    But I tested with the “Custom Post Type Multiselector” and this one worked for the custom “sector”. Is it a bug?

    best

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #20517

    Hi Mozart,
    Yes, That was a bug

    We fixed it here
    https://github.com/buddydev/bp-xprofile-custom-field-types/commit/ef579f45dffd7ace046054a51b376e7bd26c93c3

    But missed to push on wp.org. Will do by tomorrow.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 3
    Mozart Moraes on #20521

    Thanks Brajesh!

    Its work now!

    Best

You must be logged in to reply to this topic.

This topic is: resolved