{"id":5403377,"date":"2014-10-19T22:21:06","date_gmt":"2014-10-19T22:21:06","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/using-the-api\/"},"modified":"2016-08-22T03:37:02","modified_gmt":"2016-08-22T03:37:02","slug":"using-the-api","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/using-the-api\/","title":{"rendered":"Using the API"},"content":{"rendered":"<p>I&#8217;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.<\/p>\n<p>I&#8217;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()-&gt;get_children( &#8220;course&#8221;, get_the_id() ); <\/p>\n<p>I can&#8217;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.<\/p>\n<p>Is there something I have to put before like a global something?<\/p>\n<p>https:\/\/wordpress.org\/plugins\/post-connector\/<\/p>\n","protected":false},"template":"","class_list":["post-5403377","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5403377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5403377\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5403377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}