• Resolved marky_uk

    (@marky_uk)


    Hi Jeroen

    I see that your plugin adds this …

    <script type='text/javascript'>
        jQuery(document).ready( function() {
          jQuery('#lastfmrecords').lastFmRecords(lfr_config);
        });
      </script>

    … to the header of every page, yet I only show albums on the About Us page of our site. I know how to disable enqueue scripts (done for JQuery, etc) but not sure how to disable your code apart from on one page.

    Any ideas how I can do this?

    Thanks in advance!

    Mark

    https://www.ads-software.com/extend/plugins/lastfm-records/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author jeroensmeets

    (@jeroensmeets)

    Mark, good point. The transition to the new shortcode setup is obviously not yet complete. Todo item for my plugin is: a page can contain the widget and/or a shortcode. Depending on the page the code needs some js and css files.

    jQuery(‘#lastfmrecords’) has length zero on pages with no widget or shortcodes, so the weight is minimal, yet can be optimized. It’s on my list.

    Plugin Author jeroensmeets

    (@jeroensmeets)

    Hi Mark,

    this issue has been fixed in the new version. Unfortunately, I’m having trouble committing it to www.ads-software.com. Hope to have it online soon!

    Plugin Author jeroensmeets

    (@jeroensmeets)

    Mark, the new version has been submitted to www.ads-software.com. WordPress will tell you about the update.

    Thread Starter marky_uk

    (@marky_uk)

    Yay, smashing … thanks a lot for updating this … 3 times ?? Really kind .. will go and get the latest … ??

    Plugin Author jeroensmeets

    (@jeroensmeets)

    You’re welcome! The latest will do ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Last.Fm Records] Disable jquery script on all but one page?’ is closed to new replies.