Use post_name
instead of post_slug
(post_slug isn’t valid in wp_insert_post
). Just make sure you don’t accidentally create pages with duplicate slugs.
Use post_name
instead of post_slug
(post_slug isn’t valid in wp_insert_post
). Just make sure you don’t accidentally create pages with duplicate slugs.