kased
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [AWS for WordPress] Use on front end post formOk thanks. I came across this page — https://w3lessons.info/2018/02/07/php-text-to-speech-amazon-polly/ so I will try it out.
Forum: Plugins
In reply to: [AWS for WordPress] Use on front end post formOk, no problem.
On a frontend page template I have a form for creating posts, and to do so I have the following code (snippets from my full code) –
if (get_query_var('site')) { $v_Id = get_query_var('site'); $v_title = get_the_title($v_Id); $voice_id = get_post_meta($v_Id, 'amazon_polly_voice_id'); $sample_rate = get_post_meta($v_Id, 'amazon_polly_sample_rate'); $amazon_polly_settings_hash = get_post_meta($v_Id, 'amazon_polly_settings_hash'); $post_content = get_post_meta($v_Id, 'content', true); ------------ .....$voice_id = $_POST['amazon_polly_voice_id']; $sample_rate = $_POST['amazon_polly_sample_rate']; .... etc. ------------- .... $post = array( 'ID' => get_query_var('site'), 'post_title' => $v_title, 'post_content' => $post_content, 'post_status' => 'draft', 'post_type' => 'v_editor' // Use a custom post type if you want to ); $pid = wp_insert_post($post); .... -------- // form fields etc.
I want users to be able to enter text in the form content field and have the audio file created and saved to a custom folder.
I have no problem creating posts, and on the post page I see the audio player is showing, but there’s no audio being created.
On the back end it works as should, so what am I missing for the file to be created on form submission on the front end?
thanks
Viewing 2 replies - 1 through 2 (of 2 total)