no content after shortcode

You forgot the closing </audio> tag at the end. function html5_audio($atts, $content = null) { extract(shortcode_atts(array( “src” => ”, “preload”=> ‘none’, “loop” => ” ), $atts)); return ‘<audio src=”‘.$src.'” preload=”‘.$preload.'” loop=”‘.$loop.'” /></audio>’; } add_shortcode(‘audio’, ‘html5_audio’);

Audio file’s length (duration) is missing from Attachment Details in Media Library [closed]

I found that this issue could be overcome by opening the mp3 file in the excellent Linux/Windows application Mp3 Diags and applying the Rebuild VBR Data transformation. It discards the file’s Xing header and attaches a new one. After doing this, the files’s duration and bitrate are listed in it’s Attachment Details when it is … Read more

Is ‘preload=”none”‘ a valid parameter in the [audio] shortcode in WordPress 3.6?

I looked at the wp_audio_shortcode function in wp-includes/media.php of the release version of WordPress 3.6. The preload parameter is a valid attribute of the shortcode. However, the default is ‘none’, so in my case it is not needed. From WordPress 3.6 (release), wp-includes/media.php, function wp_audio_shortcode: $default_types = wp_get_audio_extensions(); $defaults_atts = array( ‘src’ => ”, ‘loop’ … Read more

Customizing default Mediaelement player

Okay so i did manage to add some custom css selectively on pages that load the medialement player by adding this to my functions.php file: function custom_player() { wp_enqueue_style( ‘custom-player’, get_stylesheet_directory_uri() . ‘/wp-mediaelement.css’ ); $custom_css = ” /*here goes the css*/ “; wp_add_inline_style( ‘custom-player’, $custom_css ); } add_action( ‘wp_enqueue_scripts’, ‘custom_player’ ); Like this by using … Read more

Using track metadata from audio shortcode

Yeah, you can access that data using get_post_meta, remember that almost everything in WordPress is a type of a post, an audio its a wp_attachment type, you just need the ID, also you can make a shortcode, this is an example: function my_audio_func($atts) { $audio_id = $atts[‘id’]; //we need an ID as attribute //we get … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)