Hi, I’m new to jQuery, but I’ve managed to set up a jQuery plugin in wordpress (Easy Slider).
The script call is in the header.php. I only really need the script for one of my pages, so I’ve tried putting a condition on it, but my code causes the plugin to break.
Here is my code:
<?php if (is_page('portfolio'))
{
echo '<script type="text/javascript" src="<?php bloginfo(\\'template_directory\\'); ?>/js/jquery.js"></script>
<script type="text/javascript" src="<?php bloginfo(\\'template_directory\\'); ?>/js/easySlider1.7.js"></script>';
}
?>
- What do I need to do to fix this condition statement?
- What does the jquery.js file do exactly? I understand wordpress already has jquery built in so do I need to call it here?
Many thanks.