Support » Plugin: Last FM » Sidebar Widget Track Count issue

  • I’ve been trying to set the sidebar widget track count to 12, but for some reason it’s only ever showing 11. I tried to see if maybe it was a count issue, and set it to 13, and it didn’t do anything differently. I’d love to use 12 when I lay it out horizontally it can fill the space.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kieran O'Shea


    The request to LastFM API is hard-coded at 10 elements in the code, which means to old tracks plus the currently playing track, hence your 11.

    If you wish to change this then you can do so in the code yourself, line 191, last-fm.php, change limit=10 to something else, like limit=15

    The track count property is designed to further reduce this limit for aesthetics – I’ll look to tie these together more properly in a future release – for now changing the code will solve the problem for you

    Thread Starter guerrilladigital


    ah yeah. that makes sense. I was tinkering with that URL and I saw it was pulling 20 if I changed the number. At that point I was just trying to troubleshoot if it was the plugin or something with the Spotify / LastFM connection API. Thanks for the clarification.

    Love this plugin, btw. I had a feature similar to this on a super old version of my website, but when they dumped their API when the company changed hands I had to get rid of the site feature. Tested and working on WP 5.6 if you need to change the documentation to reflect that.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sidebar Widget Track Count issue’ is closed to new replies.