Title: Playlist shortcode not displaying latest posts
Last modified: January 19, 2021

---

# Playlist shortcode not displaying latest posts

 *  Resolved [chrismartinjenkins](https://wordpress.org/support/users/chrismartinjenkins/)
 * (@chrismartinjenkins)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/playlist-shortcode-not-displaying-latest-posts/)
 * We are using YourChannel to display videos from one YouTube playlist, but it 
   is no longer pulling in the latest videos.
 * The page is at [https://www.iwa.wales/videos/](https://www.iwa.wales/videos/)
 * The YouTube playlist is [https://www.youtube.com/playlist?list=PLXIW8hc6slNQjD14FB8nKafNupVZY4Kmh](https://www.youtube.com/playlist?list=PLXIW8hc6slNQjD14FB8nKafNupVZY4Kmh)
 * The two most recent public videos (51 and 52 in the playlist) aren’t displaying
   on the page.
 * The shortcode I’m using is:
 * [yourchannel user=”Institute of Welsh Affairs” playlist=”PLXIW8hc6slNQjD14FB8nKafNupVZY4Kmh”
   limit=”100″ max=”100″]
 * I have also tried:
 * [yourchannel user=”Institute of Welsh Affairs” playlist=”[https://www.youtube.com/playlist?list=PLXIW8hc6slNQjD14FB8nKafNupVZY4Kmh&#8221](https://www.youtube.com/playlist?list=PLXIW8hc6slNQjD14FB8nKafNupVZY4Kmh&#8221);
   limit=”100″ max=”100″]
 * Can you see anything wrong? Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplaylist-shortcode-not-displaying-latest-posts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [plugin.builders](https://wordpress.org/support/users/pluginbuilders/)
 * (@pluginbuilders)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/playlist-shortcode-not-displaying-latest-posts/#post-13927367)
 * Hi, add **limit=”50″**. YouTube API returns at most 50 videos per load.
 * Your API Key’s restrictions are also not working. Try disabling the HTTP referrer
   checkbox at Google’s settings. You’ll see YouTube API being called in browser’s
   network tab if restrictions are not working, otherwise it’ll call the API in 
   server and will cache results.
    -  This reply was modified 5 years, 3 months ago by [plugin.builders](https://wordpress.org/support/users/pluginbuilders/).
 *  Thread Starter [chrismartinjenkins](https://wordpress.org/support/users/chrismartinjenkins/)
 * (@chrismartinjenkins)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/playlist-shortcode-not-displaying-latest-posts/#post-13933972)
 * Thanks for getting back to me so quickly. I’ve changed limit=”50″ and now all
   videos from the playlist can be viewed, but unfortunately the videos don’t get
   displayed in the correct order.
 * [https://www.iwa.wales/videos/](https://www.iwa.wales/videos/) initially displays
   50 videos, and if you scroll to the bottom and click ‘View more’, it displays
   the rest. That’s fine.
 * However, the newest videos only get displayed once the ‘View more’ button is 
   clicked, and display at the bottom. They should be displayed at the top.
 * So if there are 52 videos in a playlist, it displays the following videos on 
   the first page load:
 * 50
    49 48 … 47-4 … 3 2 1
 * Then upon clicking ‘View more’, it displays videos 52 and 51 at the bottom of
   the list:
 * 3
    2 1 52 51
 * The latest videos (52 and 51 in this case) should be displayed at the very top
   on the first page load. It should be videos 2 and 1 which don’t get displayed
   until the ‘Display remaining videos’ button is clicked.
 * Is this something that can be fixed?
 *  Plugin Author [plugin.builders](https://wordpress.org/support/users/pluginbuilders/)
 * (@pluginbuilders)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/playlist-shortcode-not-displaying-latest-posts/#post-13935992)
 * Hi, sorry, that cannot be fixed. YouTube API doesn’t let us sort playlist videos,
   they’ll appear in the same order they’re at YouTube.
 *  Thread Starter [chrismartinjenkins](https://wordpress.org/support/users/chrismartinjenkins/)
 * (@chrismartinjenkins)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/playlist-shortcode-not-displaying-latest-posts/#post-13938524)
 * Thanks for the reply, and that makes sense.
 * Unfortunately they don’t seem to be displaying in the same order as on YouTube.
   Each ‘page’ of results seems to be in reverse order to what the API response 
   provides.
 * For example, on a YouTube playlist of 5 videos, they would be numbered:
 * 1
    2 3 4 5
 * But YourChannel seems to display them in the reverse order, with the final video
   of the API response at the top:
 * 5
    4 3 2 1
 * This becomes more of a problem when the results get split over multiple pages,
   like in my example. For a 10-video playlist split over two pages, the order becomes:
 * 5
    4 3 2 1 -VIEW MORE- 10 9 8 7 6
 * If it displayed them in numerical order, from 1-5 then 6-10, then it would be
   a lot more logical.
 * I’ve sent a test request to the [https://www.googleapis.com/youtube/v3/playlistItems](https://www.googleapis.com/youtube/v3/playlistItems)
   API, and it does seem to return the videos in the correct order (1-5, then 6-
   10 once nextPageToken is provided). So I’m not sure why the plugin seems to reverse
   the results.
 * You can see the problem by comparing [https://www.iwa.wales/videos/](https://www.iwa.wales/videos/)
   to the playlist at [https://www.youtube.com/playlist?list=PLXIW8hc6slNQjD14FB8nKafNupVZY4Kmh](https://www.youtube.com/playlist?list=PLXIW8hc6slNQjD14FB8nKafNupVZY4Kmh)
 * On [https://www.iwa.wales/videos/](https://www.iwa.wales/videos/) it’s displaying
   videos 50-1, with video 50 first.
 * Surely it should display 1-50, then after the button click it should display 
   51-56?
 * Thanks in advance.
 *  Thread Starter [chrismartinjenkins](https://wordpress.org/support/users/chrismartinjenkins/)
 * (@chrismartinjenkins)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/playlist-shortcode-not-displaying-latest-posts/#post-13938541)
 * Apologies, changing ‘Default Sorting’ from ‘Latest’ to ‘None’ on the YourChannel
   settings page seems to sort that problem.
 *  Plugin Author [plugin.builders](https://wordpress.org/support/users/pluginbuilders/)
 * (@pluginbuilders)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/playlist-shortcode-not-displaying-latest-posts/#post-13939137)
 * Yes YourChannel will also sort videos after they’re loaded (this function was
   specifically built to sort playlist videos after they’re loaded from the API).

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

The topic ‘Playlist shortcode not displaying latest posts’ is closed to new replies.

 * ![](https://ps.w.org/yourchannel/assets/icon-256x256.png?rev=1106592)
 * [YourChannel: Everything you want in a YouTube plugin.](https://wordpress.org/plugins/yourchannel/)
 * [Support Threads](https://wordpress.org/support/plugin/yourchannel/)
 * [Active Topics](https://wordpress.org/support/plugin/yourchannel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yourchannel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yourchannel/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [plugin.builders](https://wordpress.org/support/users/pluginbuilders/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/playlist-shortcode-not-displaying-latest-posts/#post-13939137)
 * Status: resolved