How to bulk add posts?
-
Hi Team,
Is there any way we can add posts in bulk?
I found this https://www.oncord.com/developer/tutorials/advanced/bulk-update-scripts/ but there is no any mention of adding posts.
Thanks.
-
Hi dhondup,
There are several methods that could be used to bulk import posts, but it is a lot more trickier than the examples given in the bulk update scripts tutorial. But it can be done.
Things to consider:
- Are all your imported posts going into the same post category, or different categories, or multiple categories?
- Will your posts link to pages, or products, or contacts or neither: link to no other resource - and live independently as just posts?
- Do you want to import your posts from a CSV file?
- If your imported posts are to additionally generate / create a Page, then you will need to have administrators login access when running the script (most likely this will be the case)
As you can see there is lots of consider.
But generally speaking, you should be able to generate a post using
\Components\Website\Posts::save($arrEntity)
https://www.oncord.com/developer/api/components/website/posts/If you would like further help with this, the team at Fuel can help writing an import script to suit your specific needs, especially if your posts need to link to web pages too. You can find our contact details in the link in my profile bio.
Thanks