Use one CPT field in another CPT

This topic contains 1 reply, has 2 voices, and was last updated by  Alex Rollin 6 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #435259

    joel phillips
    Expired Member
    Post count: 82

    Okay, I am pretty sure I should be able to do this but for the life of me am having difficulty figuring it out. I created a text field and a dropdown field in one CPT using the New Field in the GD CPT Settings. I want to be able to use these fields in the other CPT’s to save me having to rebuilding them 7 times, but the only way I see to do that is by creating a custom field in functions.php.

    I am not a developer so this seems a bit excessive to create a function just to get a field into another CPT. I was also thinking that I can add duplicate a field in the db and assign it to various cpt’s but I also don’t want to break the db.

    So what is the best method and how do I execute?

    Thanks,
    Joel

    #435272

    Alex Rollin
    Moderator
    Post count: 27815

    Each CPT is independant with separate custom fields and taxonomies.

    If you really want to, yes you can create it as a pre-defined field, but it will still have to be configured for each CPT.

    Here is a blog post with an example for creating a pre-defined field.

    https://wpgeodirectory.com/custom-field-improvements-in-new-v1-6-6/

Viewing 2 posts - 1 through 2 (of 2 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount