• Home
  • About
  • Help
  • Testimonials
  • How Tos
  • Galleries
  • Slideshows
  • Galleria
  • Plugin News
  • Flickr News

Load Javascript in Footer For Earlier Page Display

April 28, 2011 by Russell Leave a Comment

  • Share
  • +1
  • Share
  • Pin It
  • Buffer

Current best practice for WordPress plugin developers is to load javascript in the footer as this allows the page content to appear sooner for the visitor. I implemented this feature in Slickr Flickr 1.25 however a few users had problems so I have introduced a more flexible solution where you can now choose whether or not you want javascript loaded in the header or the footer.

Badly Configured Themes Have Problems Due To Missing Hooks

The users who had problems were where their WordPress theme had not implemented the ‘standard’ WordPress hook wp_footer. And because this hook was not called by the theme the javascript that was queued to be loaded in the footer never got loaded at all! Without the javascript being loaded the slideshow, galleries and galleries do not run.

Slickr Flickr Can Load Javascript In Either the Header or the Footer – You Choose

With Slickr Flickr 1.28 the javascripts will by default (once again) be loaded in the header, however you will be able to go into Slickr Flickr Admin Settings, and set the option ‘Load Scripts in Footer’. If this works for your theme then you should be fine to stick with this option.

Avoid Plugin Conflicts By Loading JavaScripts In The Header

Be aware of a potential plugin conflict when trying to load the javascripts in the footer that affects the Featured Content Gallery. Featured Content Gallery incorporates the mootools library which like jQuery uses the ‘$’ symbol. Even using jQuery.noConflict(), the two libraries conflict and give a Javascript error. So it you are using the excellent Featured Content Gallery plugin then you will need to use the default setting of loading Slickr Flickr javascript in the header.

Instructions

If you are not running Featured Content Gallery plugin go to Slickr Flickr Admin settings and set the ‘Load Scripts in Footer’ checkbox.

If your site still works well then stick with this configuration

If you site stops working, remove the tick in the checkbox and revert to loading javascript in the header.

Updated by Russell.

Filed Under: Flickr How To Tagged With: flickr tutorial, plugin conflict

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest News

Slickr Flickr v2.8 was released on 8th February 2021. This supports WordPress 5.6, PHP 7.4 and has internationalisation support.

Small Slideshow In Widget

Rocco as a Stole

Joined At The Lughole

A Greener Way To See Life Down Under

You Can Almost See The Sea From Here

No Way!

A Girl Can Never Have Too Many Blankets

Does My Head Look Big In This?

Summertime and The Livin' is EZ

Somebody dropped a Sandwich?

Smile And The Whole World Smiles With You

Rocco "Downie" Junior

Slickr Flickr Support

  • Get Support with Slickr Flickr Pro
  • Slickr Flickr Documentation
  • Slickr Flickr FAQ
  • Slickr Flickr Issues
  • Suggest Ideas
  • Flickr API and HTTPS

Gallery In Widget

New To Flickr and are missing photos?

Just a reminder that for new Flickr accounts it takes 3-5 working days after you upload your fifth photo before you photos are made available by Flickr for searches and also to Slickr Flickr.

For more information see the discussion of the new Flickr account rules on the Flickr forum.

Check the status of your Flickr account by logging in to Flickr and then visiting at http://www.flickr.com/account/

Recent Posts

  • Slickr Flickr 2.8 Release
  • Slickr Flickr 2.7 Release
  • Slickr Flickr 2.6 Release
  • Slickr Flickr 2.5 Release
  • Flickr Search By Text

Recent Comments

  • MK on Slickr Flickr 2.8 Release
  • Russell on How To Display a Flickr Photoset?
  • Russell on Where do I find my Flickr ID

Tags

customizations Flickr API flickr gallery flickr photo gallery Flickr RSS flickr slideshow flickr tutorial galleria lightbox missing latest photos Newsfeed Photo Descriptions Photoset plugin conflict Portrait sorting photos tagged phots thumbnail
  • Contact
  • Donate
  • Slickr Flickr v2.7
Copyright © 2009-2025 DIYWebmastery
PO Box 85 · Hatherleigh · Okehampton · Devon · EX20 4WH · UK
  • Share
  • +1
  • Share
  • Pin It
  • Buffer
  • 0