Don’t insert if permalink is the same?
You could add the additional check to your foreach loop to see if the post with exactly same slug as the one you’re about to add already exists. Kinda difficult to tell exactly what you would have to do without seeing your current code. I’m assuming you know the slug and a type of a … Read more