How to make WordPress orderby work with post_excerpt column?

I edited the wp_playlist_shortcode function at \wp-includes\media.php WP core file, by adding if ($atts[‘orderby’]==’excerpt’ || $atts[‘orderby’]==’post_excerpt’) { function cmp($a, $b) { return strcmp($a[“caption”], $b[“caption”])*(-1); } usort($tracks, “cmp”); } before $data[‘tracks’] = $tracks; line. Basically after all tracks are generated into the $tracks array and before this array is passed to the final array $data, I … Read more

Get the Playlist embedded in Post/Page content

The get_media_embedded_in_content() uses a regex to match the input tags, but the HTML for playlists is not made from a single tag, instead it’s constructed with tags like <div>, <script>, <noscript>, <ol>, <li>. Recently I posted an answer to get post playlist like get_post_gallery() that you can check out, to see if it helps. It … Read more

WP audio playlist width

Found a solution: <div style=”float:left;width:50%;”> <div style=”padding-right:10px;”> </div></div> <div style=”float:right;width:50%;”> <div style=”padding-left:10px;”> </div></div> <div style=”clear: both;”></div> Best,

Dealing with the clickTrack event in wp-playlist.js in order to display audio download link on the playlist title row

Update: I found a super simple solution to my question several hours after posting it. It turns out a filter is not needed at all. Adding onclick=’event.stopPropagation();’ to the download link is all that is needed. It will allow for putting the download link on the same title row without affecting the ability to change … Read more

How to search titles/artist/album within a playlist, and only lists the results that match?

I unhook the wp_underscore_playlist_templates() function and create my own version prefix_wp_underscore_playlist_templates() You should first get back to or restore the default playlist template. (i.e. Hook back to wp_underscore_playlist_templates().) Add then add this somewhere in the theme’s main functions.php file: add_action( ‘wp_playlist_scripts’, function(){ ?> <script> jQuery( function( $ ){ // Add the search box. $( ‘.wp-playlist’ … Read more

Proceed to the next video of the custom post type but remain on the same post

This seems to work for now.. Added onended=”onEndVideo()” to the video element like so. <?php $mrssfeed_url = get_post_meta(get_the_id(), ‘nowthisearth_media_url’, true);?> <video onended=”onEndVideo()” id=”nowthis-video” class=”nowthis-video” style=”” width=”1280″ height=”720″ autoplay=”true” controls> <source src=”<?php echo $mrssfeed_url ?>” type=”video/mp4″> Your browser does not support the video tag. </video> Then did this for the javascript.. function onEndVideo() { document.querySelector(“a.next-post”).click(); }

WordPress Playlist WPSE

At first glance you just need to change get_tracks_from_content. Rather than running $content through do_shortcodes, split it by linebreaks (or whitespace?) and discard empty lines, or anything that isn’t an URL probably make the strip_tags call at this point, on each value you have left pass the URLs into track_shortcode as [ “src” => $url … Read more

Embed youtube list with sidemenu opened

This isn’t possible, youtube doesn’t provide an embed with an open playlist. If it did, this isn’t something that could be resolved from the WordPress end, as it’s a Youtube OEmbed issue. You will need to refer to Youtube documentation or their support channels