create wordpress user on custom post type publish

Try the following code: add_action( ‘transition_post_status’, ‘wpse_206193_new_user_from_custom_post’, 10, 3 ); function wpse_206193_new_user_from_custom_post( $new_status, $old_status, $post ) { if ( ‘publish’ !== $new_status or ‘publish’ === $old_status or ‘my_custom_post’ !== get_post_type( $post ) ) return; $userdata = array( ‘user_login’ => ‘user_name’, ‘user_email’ => ’[email protected]’, ‘user_pass’ => NULL, ‘role’ => ‘contributor’ ); if ( !username_exists( $userdata[‘user_login’] ) … Read more

Using mediaelement to display gallery of audio

It sounds like you need to set it up with unique IDs for each audio player. Try changing your PHP to this: <?php if(get_post_meta($value->ID, ‘portfolio_audio’, true)!=”){ ?> <div class=”audio-player”> <h2><?php echo $value->post_title?></h2> <audio id=”audio-player-<?php echo $value->ID; ?>” src=”https://wordpress.stackexchange.com/questions/206209/<?php echo $audio_url; ?>” type=”audio/mp3″ controls=”controls”></audio> </div><!– @end .audio-player –> That should give each audio player a unique … Read more