What is the correct way that when creating a custom post type assign values to custom fields created with pods framework?

I have managed to solve using the add_post_meta function instead of the meta_input property of the $postarr argument of the wp_insert_post function, as follows Instead of this $entry = [ “post_title” => “Some post title”, “post_content” => “Some post content”, “post_type” => “name_of_custom_post_type”, “post_status” => “publish”, “meta_input” => [ “some_meta_key” => “Some value”, “another_meta_key” => … Read more

Why it doesn’t create a custom post type after form submitting

wp_enqueue_scripts action is not meant to add PHP code to your page. It is used to add JS scripts. https://developer.wordpress.org/reference/hooks/wp_enqueue_scripts/ wp_enqueue_scripts is the proper hook to use when enqueuing scripts and styles that are meant to appear on the front end. Despite the name, it is used for enqueuing both scripts and styles. If you … Read more