A posts importer based on a JSON stream.
Posts generation by form and handle an automation system.
Thanks to this tutorial Creating Custom WordPress Administration Pages and to Easy WordPress Admin Notifications, which helped me a lot for the creation of this plugin
- Local server environment or live server
-
Tested on WP 4.9.7
-
Your Feed must be a JSON, and formatted like this below
{
"items": [
{
"pubdate": "Thu, 21 Dec 2000 16:01:07 +0000",
"description": "Your content (html is ok)1",
"title": "Title1"
},
{
"pubdate": "Thu, 21 Dec 2000 16:01:07 +0000",
"description": "Your content (html is ok)2",
"title": "Title2"
}
]
}
I do not know if it will work on previous or higher versions
- Clone or download the repository, and put files into /wp-content/plugins/
https://github.com/natinho68/wp-FeedToPosts.git
- Activate the plugin
- Go to the Feed to posts page in the admin menu
- Put a feed and click on "Generate Posts"
- Your posts have been imported
Please note that for automation, you must first inject posts via the form in the settings of the plugin. Once done, you are free to do automation as explained below.
If you want to check that new posts are available in your feed, add a cron job like this (here every 5 minutes) :
*/5 * * * * wget http://YOURDOMAIN.DOMAIN/?rest_route=/FeedToPosts/v1/feedtoposts
If you want simple authentication, add a .htaccess require_auth and .htpasswd pair, for this url. Just add --user user --password pass
to your cron job.