Perfect. It worked. thank you very much.
Hi @catacaustic
Thank you for reply. I think I am confused or mistaken. I tried this solution and glad that it worked but it created “Post” not “Page”. What I mean that from the UI I can see there are two sections “Post” and “Page”. When I used wp_instert_post() api, it created a new post in “Post” section but what I wanted was to create new page.