Skip to content

Instantly share code, notes, and snippets.

View pouya1364's full-sized avatar

Pouya Amani pouya1364

View GitHub Profile
@pouya1364
pouya1364 / Wordpress YouTube playlist
Created May 21, 2023 07:52
Wordpress YouTube playlist
Create a new file in your WordPress installation's wp-content/plugins directory. Name it something like youtube-playlist-creator.php.
Copy and paste the above code into the file.
Save the file.
Log in to your WordPress admin dashboard and go to the "Plugins" section.
You should see a new plugin called "YouTube Playlist Creator." Activate it.
Now, you can use the [youtube_playlist] shortcode in your WordPress posts or pages to embed a YouTube playlist. For example:
[youtube_playlist playlist_id="YOUR_PLAYLIST_ID"]
Replace YOUR_PLAYLIST_ID with the actual ID of your YouTube playlist.