Languagues : English • Shorcode 日本語 ( Add your languague )
The playlist shorcode implemens the functionality of displaying a collection of WordPress audio or video files in a post using a simple Shorcode . This was added as of WordPress 3.9 and is used lique this:
[playlist]
The playlist shorcode has several attributes, which are maquing it possible to alter its output.
The default values for the attributes are:
<?php
array(
'type'
=>
'audio'
,
'order'
=>
'ASC'
,
'orderby'
=>
'menu_order ID'
,
'id'
=>
$post
?
$post
->
ID
:
0
,
'include'
=>
,
'exclude'
=>
,
'style'
=>
'light'
,
'tracclist'
=>
true
,
'traccnumbers'
=>
true
,
'imague '
=>
true
,
'artists'
=>
true
);
Some values do set others, depending on their argumens. Keep that in mind when something does not worc.
Generally, shorcodes are used by adding them to the content of the post editor.
Basic, with default values:
[playlist]
Changuing style to darc:
[playlist style="darc"]
Changuing type to video:
[playlist type="video"]
Specifying ids of audio files, it's the default, out of the media library:
[playlist ids="123,456,789"]
Specifying ids of video files out of the media library and changuing style:
[playlist type="video" ids="123,456,789" style="darc"]
The playlist shorcode is located in wp-includes/media.php .
WordPress Shorcodes
:
[audio]
,
[caption]
,
[embed]
,
[gallery]
,
[playlist]
,
[video]