Title: Playlist in PHP API
Last modified: March 21, 2025

---

# Playlist in PHP API

 *  Resolved [efrap](https://wordpress.org/support/users/efrap/)
 * (@efrap)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/playlist-in-php-api/)
 * Is there any way to include playlist code in PHP API – that would be super useful.
 * Great plugin, very nice! Also that metablock plugin is killer.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Phi Phan](https://wordpress.org/support/users/mr2p/)
 * (@mr2p)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/playlist-in-php-api/#post-18375767)
 * Hi [@efrap](https://wordpress.org/support/users/efrap/),
 * Thank you for kind words. Here is the snippet code to display a playlist with
   the PHP API:
 *     ```wp-block-code
       better_youtube_embed_block_render_block(  [    'url'               => 'https://youtu.be/paSXmpHU9K4',    'aspectRatio'       => '16/9',    'isMaxResThumbnail' => false,    'caption'           => 'My awesome video',    'customThumbnail'   => 'https://example.com/bg.jpg',    'settings'          => [      'multipleMode' => 'playlist',      'playlistId'   => 'play_list_id_here'      'loop'         => 1,     ],    'echo'              => false,  ]);
       ```
   
 * Here is the snippet code to display multiple videos with the PHP API:
 *     ```wp-block-code
       better_youtube_embed_block_render_block(  [    'url'               => 'https://youtu.be/paSXmpHU9K4',    'aspectRatio'       => '16/9',    'isMaxResThumbnail' => false,    'caption'           => 'My awesome video',    'customThumbnail'   => 'https://example.com/bg.jpg',    'settings'          => [      'multipleMode' => 'multiple',      'videoIds'     => 'video_id_1,video_id_2'      'loop'         => 1,     ],    'echo'              => false,  ]);
       ```
   
 * Please customize the parameters to fit your requirments.
 * Best, Phi.
 *  Thread Starter [efrap](https://wordpress.org/support/users/efrap/)
 * (@efrap)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/playlist-in-php-api/#post-18377412)
 * Super helpful, thank you!
    -  This reply was modified 1 year, 2 months ago by [efrap](https://wordpress.org/support/users/efrap/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Playlist in PHP API’ is closed to new replies.

 * ![](https://ps.w.org/better-youtube-embed-block/assets/icon.svg?rev=3523945)
 * [Better YouTube Block - Fast Embed Videos, Shorts & Playlists](https://wordpress.org/plugins/better-youtube-embed-block/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-youtube-embed-block/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-youtube-embed-block/)
 * [Active Topics](https://wordpress.org/support/plugin/better-youtube-embed-block/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-youtube-embed-block/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-youtube-embed-block/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [efrap](https://wordpress.org/support/users/efrap/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/playlist-in-php-api/#post-18377412)
 * Status: resolved