0

I am importing the posts into the wordpress from external API's , i have created the plugin for this, posts are imported successfully. but now i am going to implement auto check for the new API changes and if new posts exists on the API then import that post into the wordpress. What is the best way to implement this ? Can i request the API URL after a certain amount of time ?

1

Yes you can use wp_schedule_event to trigger a hook used in your plugin to request the API URL after a certain amount of time.

3
  • It will be nice if you can add some snippet of psedu code that illustrates the use of the technique and not only a link to RTFM ;) Sep 21 '16 at 4:19
  • There are already working code examples at the link provided.
    – johnh10
    Sep 21 '16 at 13:14
  • As I said RTFM do not make a good answer and the codex is obsolete in any case Sep 21 '16 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.