API – How to link custom posts together

This topic contains 11 replies, has 3 voices, and was last updated by  Kiran 4 years, 9 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #529759

    Ewen Nedelec
    Full Member
    Post count: 10

    Hello,

    We are working with your API to create custom posts, and we are looking to link two custom posts together through your API.

    Is there any way to link custom posts together using you API?

    Looking forward to hearing from you soon!

    Best Regards!

    #529818

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    I will ask the developers to take a look at your question.

    #529967

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #530017

    Ewen Nedelec
    Full Member
    Post count: 10

    Hi Kiran,

    Thanks for your feedback.

    We are trying to link Post Types together through the API and not Custom Post, sorry for the misunderstanding.

    So, there is no possibility to link two Post Types together? Our project is to have two differents Post Types:

    – Service Provider
    – News

    People that are register into the post type “Service Provider” can log into a custom Symfony backend and create “News” from this backend. When the “Service Provider” create a “News”, we send it to WordPress through your API and the creation works fine. But now we are looking to link the two Post Types (Service Provider and News) together through the API.

    Is there any way to do this?

    Thanks for your support.

    Best regards!

    #530044

    Alex Rollin
    Moderator
    Post count: 27815

    The Link Post type field stores the value of a linked post.
    If News is linked to service provider, then add a Link Post field to news.

    You can save the Post ID of a linked post to the Link Post field, just like any other custom field.

    Have you already set this up using the Custom Post Types addon?

    https://wpgeodirectory.com/docs-v2/addons/custom-post-types/

    #530136

    Ewen Nedelec
    Full Member
    Post count: 10
    This reply has been marked as private.
    #530138

    Ewen Nedelec
    Full Member
    Post count: 10
    This reply has been marked as private.
    #530269

    Kiran
    Moderator
    Post count: 7069

    Hi Ewen,

    It looks like something from recent version affected for the linked posts API feature.

    We have fixed this issue and it will be in next release. Provide us a admin & FTP credentials to apply patch.

    Regards,
    Kiran

    #530382

    Ewen Nedelec
    Full Member
    Post count: 10
    This reply has been marked as private.
    #530750

    Kiran
    Moderator
    Post count: 7069

    Hi Ewen,

    I have made changes in following plugin directories.

    – /wp-content/plugins/geodir_custom_posts
    – /wp-content/plugins/geodir_event_manager

    Please check now and let us know.

    Regards,
    Kiran

    #531365

    Ewen Nedelec
    Full Member
    Post count: 10

    Hi Kiran,

    Perfect, everything works fine now!

    Thanks for your help!

    #531367

    Kiran
    Moderator
    Post count: 7069

    Thanks for letting us know.

    Kiran

Viewing 12 posts - 1 through 12 (of 12 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