• data.src goes directly to the mp3 file, how do i change the link to the attachment page?

    the closest i got was “data.title”, but it has spaces in it and the attachment page doesn’t…

    please help me with this..

    wp-includes/media.php Line: 1108

    /**
     * Output the templates used by playlists.
     *
     * @since 3.9.0
     */
    function wp_underscore_playlist_templates() {
    ?>
    <script type="text/html" id="tmpl-wp-playlist-current-item">
    	<# if ( data.image ) { #>
    	<img src="{{ data.thumb.src }}"/>
    	<# } #>
    	<div class="wp-playlist-caption">
    		<span class="wp-playlist-item-meta wp-playlist-item-title">“{{ data.title }}”</span>
    		<# if ( data.meta.album ) { #><span class="wp-playlist-item-meta wp-playlist-item-album">{{ data.meta.album }}</span><# } #>
    		<# if ( data.meta.artist ) { #><span class="wp-playlist-item-meta wp-playlist-item-artist">{{ data.meta.artist }}</span><# } #>
    	</div>
    </script>
    <script type="text/html" id="tmpl-wp-playlist-item">
    	<div class="wp-playlist-item">
    		<a class="wp-playlist-caption" href="{{ data.src }}">
    			{{ data.index ? ( data.index + '. ' ) : '' }}
    			<# if ( data.caption ) { #>
    				{{ data.caption }}
    			<# } else { #>
    				<span class="wp-playlist-item-title">“{{{ data.title }}}”</span>
    				<# if ( data.artists && data.meta.artist ) { #>
    				<span class="wp-playlist-item-artist"> &mdash; {{ data.meta.artist }}</span>
    				<# } #>
    			<# } #>
    		</a>
    		<# if ( data.meta.length_formatted ) { #>
    		<div class="wp-playlist-item-length">{{ data.meta.length_formatted }}</div>
    		<# } #>
    	</div>
    </script>

  • The topic ‘How to change playlists mp3 url to attachment page url’ is closed to new replies.