Support

Account

Home Forums General Issues Audio playlist field Reply To: Audio playlist field

  • Many thanks for the info.
    The following works perfectly:

    add_filter( 'ajax_query_attachments_args', 'show_audio_attachments', 10, 1 );
    function show_audio_attachments( $query=array() ) {
    	if( $_POST['query']['_acfuploader'] && $_POST['query']['_acfuploader'] == 'field_589471f6b171a' ) {
    		$query['post_mime_type'] = 'audio';
    	}
      return $query;
    } 

    The downside may be is that it relies on hard coded field reference, but if I’m to change the fields structure I’ll have other problems to deal with anyways.

    Also I have to make it work with Media Library Assistant plugin.
    I’ll keep you posted…