WordPress HighSlide Plugin Error: ‘hs’ is undefined
When integrating Highslide with your WordPress blog there are numerous additions that need to be made outside of actually installing the plugin. First you need to make sure that you have the highslide.css file located in the /wp-content/plugins/highslide/ directory. After that you need to make sure that you add the code listed below to the footer.php file of your blogs theme.
- 'hs' is undefined
I finally figured out that I had accidently copied a file from a previous backup that was using a different domain. Anyhow it ended up being that the footer.php file I was using with my theme was pointing to HighSlide CSS definitions on a domain that no longer existed. So if you run into this type of error check the CSS you added to your footer.php file for Highslide to work.
In the code below you would change YOURSITE to the proper domain.
- <!– Start Highslide Mod –>
- thumbnailId: null,
- overlayId: 'controlbar',
- position: 'top right',
- hideOnMouseOut: true
- hs.graphicsDir = 'YOURSITE/wp-content/plugins/highslide/graphics/';
- hs.outlineType = 'rounded-white';
- hs.captionEval = 'this.thumb.title';
- hs.showCredits = false;
- <div id="controlbar" class="highslide-overlay controlbar">
- <a href="#" class="previoushs" onclick="return hs.previous(this)" title="<?php _e('Previous (left arrow key)'); ?>"></a>
- <a href="#" class="nexths" onclick="return hs.next(this)" title="<?php _e('Next (right arrow key)'); ?>"></a>
- <a href="#" class="highslide-move" onclick="return false" title="<?php _e('Click and drag to move'); ?>"></a>
- <a href="#" class="closehs" onclick="return hs.close(this)" title="<?php _e('Close'); ?>"></a>
- <!– End Highslide Mod –>
The above code is from the following site where there is also more information about highslide integration with WordPress.