• I’ve installed a multisite system. Now I want to let users create posts using my own form, then I’ll use wp_insert_post to insert data to database instead of using existing dashboard of WP.

    But there’s a problem, I don’t know which blog that the function wp_insert_post will insert my data to. How to control this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Other than wrapping it in a switch_to_blog() call, I’m not sure…

    Have you considered something like TDO forms, which does all the heavy lifting for you? Even that is installed per-site, though.

    Thread Starter ndthuan

    (@ndthuan)

    Thanks! I’ll give it a try…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to use wp_insert_post on multisite mode’ is closed to new replies.