• Resolved pelchatd62

    (@pelchatd62)


    I’m using your product with Events Manager and it works great except, I now want to format the related events myself and I tried using your API functions.

    I’ve seen the list on your site but I have difficulties with getting the posts. After hours of searching I found your example that begins with: $my_connected_posts = Post_Connector::API()->get_children( “course”, get_the_id() );

    I can’t make that line works. I changed the slug for my type, get_the_id() works but if I put this complete line, nothing else after this line is executed.

    Is there something I have to put before like a global something?

    https://wordpress.org/plugins/post-connector/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter pelchatd62

    (@pelchatd62)

    OK I was able to make it work like that:

    $toto = new SP_Post_Link_Manager();
    $my_connected_posts = $toto->get_children( "events-links", get_the_id() );

    There is probably something I don’t understand about classes etc. What I know is that your documentation is not perfect. The Change log mentions that you are on version 1.5.3 since August 16th but I could only find version 1.0.1.

    Plugin Author Barry Kooij

    (@barrykooij)

    Hey there,

    Sorry for the confusion but there are 2 versions of Post Connector. The free version of Post Connector is on version 1.0.1 and does not contain an API. The Pro version, purchasable from the website, does have an API and is on version 1.5.3.

    All API code examples on the website only work with the Pro version, since they all use the API. Although your code might work now, there is a chance the SP_Post_Link_Manager changes in the future causing your code to stop working / need modification. When using the API, backwards compatibility is guaranteed.

    Hope this answers your questions.

    Cheers,
    Barry

    Thread Starter pelchatd62

    (@pelchatd62)

    Thank you for the answer.

    Have I known, I would have bought the PRO version yesterday. I worked hours to make that work. You should put something on your site to let people know. I was tempted to buy the PRO version but there was nothing I needed in the list of features(so I thought).

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

The topic ‘Using the API’ is closed to new replies.