• I am having trouble with a plugin trying to link to javascript files for a lightbox. I am including the lightbox inside of the plugin I am creating. I lifted the code from another plugin to include the javascript files (which is below) and it includes the javascript files in the head just fine, I even tested it by manually linking to the scripts just to make sure that everything was in the right place and it IS however the lightbox will not work despite the locations looking identical (hard coded and with the plugin linking to it) I am friggen stumped…

    function wpsb_script(){
    	$scriptslocation = get_settings("siteurl") . "/wp-content/plugins/flickr_qwik3r/jquery_lightbox/";
    	?>
    	<?php echo "\n"; ?><link rel="stylesheet" type="text/css" href="https://www.dailycoder.net/blog/wp-content/plugins/flickr_qwik3r/jquery_lightbox/css/lightbox.css" /> 
    
    	<script type="text/javascript" src="<?php echo $scriptslocation; ?>lightbox.js"></script>
    		<script type="text/javascript" src="<?php echo $scriptslocation; ?>jquery-1.2.1.min.js"></script>
    
    	<?php
    }
    add_action('wp_head','wpsb_script');
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Having trouble making a plugin link to external files’ is closed to new replies.