Answer by Pbalazs89 for wp_insert_post from XML feed only inserting first post
Thanks for everyones help. I was able to solve it like this:In the original code I added, the data[] variable did not get filled up with the post data.This was partially because of syntax errors ($key...
View ArticleAnswer by Tom J Nowell for wp_insert_post from XML feed only inserting first...
You are doing this to add posts to the $data array:$data = ...This is not how you add something to an array. You want to append, not assign.Think of it like writing a list of 5 things, where for each...
View Articlewp_insert_post from XML feed only inserting first post
My aim is to import all XML files from a folder inside the WordPress installation (/data/*.xml)To achieve this, I added action in functions.php:/** * Show 'insert posts' button on backend */add_action(...
View Article
More Pages to Explore .....