Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter novakuso

    (@novakuso)

    Thank you for your help.

    I think I found a fitting solution. I deleted my settings from the post before, but sticked with Advanced Custom Fields.

    I am currently using the plugin ACF Post-2Post Plugin: https://wordpress.com/plugins/post-2-post-for-acf

    The setup worked for me.
    I now have to different field groups in which the posts of the other cpt are displayed.
    With the help of internet research and a little bit of chat gpt I implemented a filter. Now there is the option to only select a post as a relationship object that was created by the same post author.

    In the frontend users will automatically only be able to choose from posts they created.
    To prevent any errors during a submission, currently the post_id is submitted without the user even touching and seeing anything.

    If there is a better solution, where the effort and time pays of, I am willing to put it in and do some coding myself. I have a solid coding exprience and understanding and the will to learn new stuff. But in that regard I am not that familiar with php.

    Thread Starter novakuso

    (@novakuso)

    Thank you for your quick answer.

    To be honest, I didn’t check the database on how PODs saves their relationship objects, because I figured that it would be faster to implement the bidirectional relationship functionality with Advanced Cusom Fields following their documentation.
    Indeed worked for me.

    I am still not fully satisfied, because PODs offers such a nice feature for free, without coding yourself. But for now it’s ok and I might take a closer look in the database in the future if needed.

    Regarding ACFs solution…

    I added a field group with a relationship field that covers both Post types and is displayed in both Post Type Edit Menus. Thus it’s possible to add mulitple properties to a room and even rooms to rooms from the backend. Not the functionality I wanted, but for a user from the frontend, it won’t be possible.
    Their documentation didn’t cover connecting multiple custom post types with each other, but this works for me as already said. I have tried setting it up with two different Field Groups and Relationship fields to seperate the Post Types and prevent the cases I mentioned earlier, where multiple properties can be assigned to a room. Haven’t found a solution yet.

    So far I am using Ajax for submitting the Jet Form Builder form.

    PODs unfortunatly won’t find a place in my project, not only because of my relationship issue, but the inbuild gallery feature doesn’ work, how it’s supposed to. I can add multiple images from the frontend and backend, but deleting a picture dosn’t delete it from the post. (Maybe a CronJob, Update method or Cache error?)

    I will search for help in their forum and will search for other plugins meanwhile.

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