• Resolved godavid33

    (@godavid33)


    Hi,

    first off thanks for this amazing plugin! It’s been helping me a lot in setting up an app where a lot of posts are inter-related.

    I am trying to allow for remote access of the data using JSON though, and in order to echo the JSON, I must hook onto “init”. Unfortunately, p2p_init happens after init, and I cannot seem to access the connected post types. Is there a way I can access connected post types as early as init? Just fetching the ID of the connected types would be sufficient.

    Thanks,
    G

    https://www.ads-software.com/plugins/posts-to-posts/

Viewing 1 replies (of 1 total)
  • Thread Starter godavid33

    (@godavid33)

    aha! The myth is true; posting in a forum causes you to suddenly become more clever and self-reliant.

    The solution:

    do_action(“p2p_init”)

    Add that before trying to access connections and voila.

Viewing 1 replies (of 1 total)
  • The topic ‘Is it possible to get connections before p2p_init?’ is closed to new replies.