how can i Add Custom JavaScript and Stylesheet in header.php file
-
Hi,
I have doubt in WordPress 3.1.2.. How can i add my custom .js files and Stylesheet files in header.php file.
I placed in my .js files in my js folder, and stylesheet files in my css folder these folder are in my themes folder. Even so, it doesn’t work.
for example:
I used like this in my header.php file
<!-- new css and js file for content scroll start --> <?php if(is_page()){ ?> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?> /css/jquery.jscrollpane.css"> <?php } ?> <?php if(is_page()){ ?> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?> /css/demo.css"> <?php } ?> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript" src="/js/jquery.jscrollpane.min.js"></script> <script type="text/javascript" src="/js/jquery.mousewheel.js"></script> <script type="text/javascript" src="/js/demo.js"></script> <script type="text/javascript" id="sourcecode"> $(function(){ $('.scroll-pane').jScrollPane(); }); </script> <!-- css & js end -->
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘how can i Add Custom JavaScript and Stylesheet in header.php file’ is closed to new replies.