March 23, 200917 yr I've used a script/code, which links and allows you show your latest pictures in Flickr (see example from my test site Flickr link - test page The script and link to script file has to go in the header and this works fine in the dedicated html page. Now to my problem ... I'm playing with WordPress and want to integrate this code into a WP page. I've put the code into the header.php file and it works However, there is a conflict with other pages that use the "lightbox" - instead of opening the lightbox, it opens a new tab After a bit of investigation, the problem is the link to the js file <script type="text/javascript" src="script/jquery-1.2.6.min.js"></script> Is there a way around this problem? p.s. I don't have the Flickr code in the blog just now as I want the lightbox working
March 23, 200917 yr The link should be fine, what's telling you it's that link and what are the errors? Often a mistake in the code will cause firebug to throw up errors within the jquery file, when that's not the actual cause of the fault. I'm assuming that the flickr script, and lightbox work fine standalone, so it's obviously a code conflict. Have you got a link to an example page with both on?
March 23, 200917 yr Author Cheers bocaj The problem is that it doesn't give any errors - it's just the functionality of the lightbox that is affected (as described in my 1st post). To investigate the problem - the page is edited in the WP editor and it was a case of removing the lines of code and retrying it till it broke
March 23, 200917 yr Author I've installed Firebug (fantastic tool ) With no Flickr code in, Firebug does not show any errors. However, when I put the code in, it throws up errors in the prototype.js and lightbox.js files the flickr code is currently in if you want to look Flickr page Lightbox page
March 24, 200917 yr Author Cracked it :D Here is my solution Create a file with your code - save as .php Modify your header.php with an if statement to include your new php file - (see code below) <?php // add code for individual page if (is_page('xx')){ include(TEMPLATEPATH.'/yourfile.php'); } ?> Note - is_page('xx'), where xx can be any of page title page slug page ID
Create an account or sign in to comment